forked from guifre/notes
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit.txt
More file actions
23 lines (21 loc) · 643 Bytes
/
git.txt
File metadata and controls
23 lines (21 loc) · 643 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
*git*
git
Rebase prevents merge commits
*$ git pull --rebase*
*$ git stash; git stash pop*
Resets last commit in local repo and remote
*$ git reset HEAD^; git push -f*
Aborts merge status
*$ git merge --abort*
Sets head to origin after diverged paths and unstages files
*$ git reset --hard origin*
Keeps indexes
*$ git reset --soft origin*
Delete a branch
*$ git branch -D branch_name*
Checkout a specific revision to new branch
*$ git checkout -b branch_name revision_id*
Push a revision to branch
*$ git push -f origin branch_name*
List remotes
*$ git remote -v*