Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
training:git_commands [2016/01/28 02:33] jobatake [Useful syntax] |
training:git_commands [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
Please feel free to add to this page! :D | Please feel free to add to this page! :D | ||
- | * Create things: | + | |
- | * Make git folder repository: git init | + | |
- | * Add file: git add <file name> | + | ===== Create Things ===== |
- | * Remote folder: git remote add <filename> https://github.com/try-git/try_git.git | + | |
- | * Store: git commit -m"<thing changed>" | + | |
- | * Save things: | + | |
- | * Remote repository: git push origin <branchname> | + | | git init | Make git folder | |
- | * See changes: | + | | git add <filename> | Add a file | |
- | * Summary of commits (ie. delete, add, etc.): git log | + | | git remote add <url> | Add a remote source | |
- | * File changes: git status | + | | git commit -m "comment" | Store | |
- | * Working directory changes: git diff | + | |
- | * Delete/Undo things: | + | ===== Save Things ===== |
- | * Remove file: git remove <branchname>/<filename> | + | |
- | * Undo: git checkout — <filename> | + | |
+ | | git push origin <branchname> | Remote repository | | ||
+ | |||
+ | ===== See Changes ===== | ||
+ | |||
+ | |||
+ | | git log | See a summary of commits | | ||
+ | | git status | See file changes | | ||
+ | | git diff | Working directory changes | | ||
+ | |||
+ | ===== Delete/Undo Things ===== | ||
+ | |||
+ | | git rm <filename> | Remove file | | ||
+ | | git reset | Undo | |