Wednesday, July 20, 2016

Switch to a GIT branch and make changes (for beginners/noobs)

Once GIT is loaded you'll be at the MASTER branch by default.

Note: the following assumes you already know the name of the branch you need to work with, to list all branches, do: 
git branch -a

1- Switch to branch named "development"
git checkout development
2- Pull changes from branch "development"
git pull origin development
please note: if branch has parenthesis, you have to use double quotes

git pull origin "development(mobile)"
3- Make all changes you need to do (i.e. modify css, php code, etc..) 4- When ready, add all changes you just made
git add -A
5- Add a description of the change
git commit -m "modified css code"
6- Push changes to development branch
git push origin development
7- Go back to MASTER branch
git checkout master
That's it :)

No comments:

Post a Comment