Creation & Clone Clone an existing remote repository locally: git clone protocol://user@domain/repo.git
Create a empty local repository: Local Changes Display modified files in the local repository: Display changes made to tracked files: Display changes summary of tracked files: Display changes made to a single file only: Add files to the staging area: git add -v <FILE1> [FILE2 ...]
Add all modified files to the staging area (tracked + untracked): Add only a portion of changes from a file to the staging area: - y : Yes, add the selected chunk to the staging area
- n : No, do not add
- a : Yes, add all remaining chunks in the current file
- d : No, do not add any remaining chunks in the current file
- s : Split the modification group into individual changes
- e : Manually edit the selected chunk
- q : Quit adding
| Commits Commit the contents of the staging area: Commit the contents of the staging area with a sign-off signature: Amend current commit with staged changes and modify the message: Amend current commit with staged changes without message edition: git commit --amend --no-edit
Stash Stash the changes made to sources and reset to HEAD: Manually stash changes chunks made to sources: - y : Yes, stash this hunk
- n : No, do not stash this hunk
- q : Quit, do not stash any remaining hunk
- a : All, stash this hunk and all later hunks in the file
- d : Deny, do not stash the remaining hunks in the file
- e : Edit, manually edit the current hunk
Restore the last stash of changes to the working directory: Remove all stashed entries: |