Add some git commands
This commit is contained in:
parent
7861cbdd09
commit
6e04d3995a
1 changed files with 30 additions and 1 deletions
31
shell_tools
31
shell_tools
|
|
@ -71,6 +71,35 @@ Close current pane
|
|||
<kbd>Ctrl</kbd>+<kbd>b</kbd>,<kbd>x</kbd>
|
||||
|
||||
# git
|
||||
## Basics
|
||||
Initialize the current directory as git repository
|
||||
`git init`
|
||||
|
||||
Stage changes of a file or directory
|
||||
`git add <directory>`
|
||||
|
||||
Commit changes with message
|
||||
`git commit -m <commit message>`
|
||||
|
||||
List files staged, unstaged and untracked
|
||||
`git status`
|
||||
|
||||
Display entire commit history in a nice way
|
||||
`git log --all --graph --decorate`
|
||||
|
||||
## Branches
|
||||
List all branches in current repo
|
||||
`git branch`
|
||||
|
||||
Create new branch named *branch_name* and checkout on it
|
||||
`git checkout -b <branch_name>`
|
||||
|
||||
|
||||
## Undoing stuff
|
||||
|
||||
## Remote repositories
|
||||
|
||||
# docker
|
||||
# weechat
|
||||
|
||||
Switch between weechat core buffer and server buffer
|
||||
<kbd>Ctrl</kbd>+<kbd>x</kbd>
|
||||
|
|
|
|||
Loading…
Reference in a new issue