mirror of
https://github.com/cheat/cheat.git
synced 2024-11-26 07:51:35 +01:00
Git cheatsheet: trivial changes
Slightly reorganized the order in which some of the examples were presented.
This commit is contained in:
parent
fb5721f887
commit
c6441524b0
@ -20,14 +20,16 @@ git push origin master
|
||||
# To push to a specified repository:
|
||||
git push git@github.com:username/project.git
|
||||
|
||||
# To delete the branch "branch_name"
|
||||
git branch -D branch_name
|
||||
|
||||
# To sync a fork with the master repo:
|
||||
git remote add upstream git@github.com:name/repo.git # Set a new repo
|
||||
git remote -v # Confirm new remote repo
|
||||
git fetch upstream # Get branches
|
||||
git branch -va # List local - remote branches
|
||||
git branch -D branch_name # Delete the branch branch_name
|
||||
git checkout master # Checkout local master branch
|
||||
git checkout -b branch # Create and checkout a new branch
|
||||
git checkout -b new_branch # Create and checkout a new branch
|
||||
git merge upstream/master # Merge remote into local repo
|
||||
git show 83fb499 # Show what a commit did.
|
||||
git log # Show all the commits
|
||||
|
Loading…
Reference in New Issue
Block a user