... | @@ -22,6 +22,7 @@ Command | Effect |
... | @@ -22,6 +22,7 @@ Command | Effect |
|
`git config --global core.editor "gedit -w -s" ` | Set commit message editor to `gedit`. Simple GUI editor.
|
|
`git config --global core.editor "gedit -w -s" ` | Set commit message editor to `gedit`. Simple GUI editor.
|
|
`git config --global core.editor "vim" ` | Set the default commit message editor to `vim`.
|
|
`git config --global core.editor "vim" ` | Set the default commit message editor to `vim`.
|
|
|
|
|
|
|
|
|
|
### Simple Git Commands
|
|
### Simple Git Commands
|
|
Command | Effect
|
|
Command | Effect
|
|
--- | ---
|
|
--- | ---
|
... | @@ -31,6 +32,9 @@ Command | Effect |
... | @@ -31,6 +32,9 @@ Command | Effect |
|
`git add <file or folder>` | Add the specific file or folder to the staging area.
|
|
`git add <file or folder>` | Add the specific file or folder to the staging area.
|
|
`git commit` | Move the changes from the staging area to `HEAD` on your local machine
|
|
`git commit` | Move the changes from the staging area to `HEAD` on your local machine
|
|
`git push` | Send the commits on your local machine to the GitLab server
|
|
`git push` | Send the commits on your local machine to the GitLab server
|
|
|
|
`git reset <file or folder>` | Un-stage changes to a file that have been git added. Local changes kept.
|
|
|
|
`git checkout -- <file or folder>` | Replaces the changes in file with the last content in HEAD. Local changes removed!
|
|
|
|
` git reset --hard origin/master ` | Replaces **all** local changes with the server version. Local changes destroyed!
|
|
|
|
|
|
### Simple Git Flow
|
|
### Simple Git Flow
|
|
1. `git pull`
|
|
1. `git pull`
|
... | | ... | |