Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
training:git_commands [2016/01/24 23:32] kluong created |
training:git_commands [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Git Commands ====== | ====== Git Commands ====== | ||
+ | ===== Useful syntax ===== | ||
+ | Please feel free to add to this page! :D | ||
+ | |||
+ | |||
+ | |||
+ | ===== Create Things ===== | ||
+ | |||
+ | |||
+ | |||
+ | | git init | Make git folder | | ||
+ | | git add <filename> | Add a file | | ||
+ | | git remote add <url> | Add a remote source | | ||
+ | | git commit -m "comment" | Store | | ||
+ | |||
+ | ===== Save Things ===== | ||
+ | |||
+ | |||
+ | | 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 | |