Last active
March 4, 2020 23:45
-
-
Save dsrini-open/2907aec302e8f9e763762e359f5dffa3 to your computer and use it in GitHub Desktop.
GIT useful commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT merge: | |
git checkout master | |
git pull origin master | |
git merge <branch> | |
git push origin master | |
GIT delete branches: | |
Remote then local | |
git push -d origin <branch_name> | |
git branch -d <branch_name> | |
GIT merge master to branch: | |
git checkout test | |
git merge origin/master | |
(or) | |
git checkout test | |
git rebase master | |
GIT create branch: | |
git checkout -b [name_of_your_new_branch] | |
git push origin [name_of_your_new_branch] | |
GIT revert: | |
git checkout filename | |
git checkout -- filename | |
GIT Remove newly added gitignore files: | |
git commit (first do a commit) | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore fix" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment