Skip to content

Instantly share code, notes, and snippets.

@anisur3036
Created July 10, 2019 13:38
Show Gist options
  • Save anisur3036/3e444fdce672375da4d8a071aa41f9b4 to your computer and use it in GitHub Desktop.
Save anisur3036/3e444fdce672375da4d8a071aa41f9b4 to your computer and use it in GitHub Desktop.
Git cheat sheet
#edit something in git repo
git checkout -b newBranch
#first creating new branch
#then add/edit/delete some file
#then if is ok then switch to master branch
#and merge it
git merge newBranch
#after merge(successfully), delete contact branch
git branch -D newBranch
#in local repo/machine get the update version
git pull
#see all branch
git branch -a
#delete remote branch
git push origin --delete branch
#upload a new branch on remote repo
git push origin -u newBranch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment