Created
July 12, 2018 05:03
-
-
Save milinmestry/3a7d23750088f0c60f389ea7981fd616 to your computer and use it in GitHub Desktop.
Helpful GIT commands
This file contains hidden or 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 NOTES- | |
Create a branch in Git from another branch | |
https://stackoverflow.com/questions/4470523/create-a-branch-in-git-from-another-branch | |
For first time to fetch PHASE-3 branch on local machine: | |
git fetch && git checkout PHASE-3 | |
To fetch all latest changes from other developer(s) on your local machine: | |
git pull origin PHASE-3 | |
Create a new branch (IBR-277) under PHASE-3 branch: | |
git checkout -b IBR-277 PHASE-3 | |
Check which files to be added in the commit: | |
git status -s | |
Add file(s) in the local branch created above: | |
git add file1 file2 fileN | |
Add commit message: | |
git commit -m "IBR-277 message for this commit." | |
Push the changes to remote GIT repository under PHASE-3 branch: | |
git push origin IBR-277:PHASE-3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment