add git notes
This commit is contained in:
parent
4833240f93
commit
81f0bd9227
20
git.md
Normal file
20
git.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
Branches
|
||||||
|
============================================
|
||||||
|
|
||||||
|
|
||||||
|
### Adding Branches ###
|
||||||
|
* local: `git checkout -b <branch>`
|
||||||
|
* remote: `git push --set-upstream <remote> <branch>`
|
||||||
|
* track remote: `git checkout --track <origin>/<branch>`
|
||||||
|
|
||||||
|
### Deleting Branches ###
|
||||||
|
|
||||||
|
* local: `git branch -d <name>`
|
||||||
|
* remote: `git push -d <remote> <name>`
|
||||||
|
* realize remote deletes: `git remote prune <remote>`
|
||||||
|
|
||||||
|
### Non-Standard Activities ###
|
||||||
|
|
||||||
|
* merge only a single file into another branch `git checkout <branch> -- <file>`
|
||||||
|
* do not track `git rm <file>`
|
Loading…
Reference in New Issue
Block a user