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 06:38] kluong [Useful syntax] |
training:git_commands [2021/09/19 21:59] (current) |
||
---|---|---|---|
Line 6: | Line 6: | ||
- | Create things: | + | ===== Create Things ===== |
- | Save things: | ||
- | See changes: | ||
- | Delete/undo 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 ===== | ||
- | * Create things: | + | |
- | * Make git folder repository: git init | + | | git push origin <branchname> | Remote repository | |
- | * Add file: git add <file name> | + | |
- | * Remote folder: git remote add <filename> https://github.com/try-git/try_git.git | + | ===== See Changes ===== |
- | * Store: git commit -m"<thing changed>" | + | |
- | * Save things: | + | |
- | * Remote repository: git push origin <branchname> | + | | git log | See a summary of commits | |
- | * See changes: | + | | git status | See file changes | |
- | * Summary of commits (ie. delete, add, etc.): git log | + | | git diff | Working directory changes | |
- | * File changes: git status | + | |
- | * Working directory changes: git diff | + | ===== Delete/Undo Things ===== |
- | * Delete/Undo things: | + | |
- | * Remove file: git rm <filename> | + | | git rm <filename> | Remove file | |
- | * Undo: git reset | + | | git reset | Undo | |
- | * Navigate github: | + | |
- | * Change directory: git checkout — <filename> | + |