Friday, September 25, 2015

GIT How to create a branch and apply changes to server? (for beginners / noobs)

How to create a branch and apply changes to master:
  1. On "master" branch, do "git checkout -b new-branch"
  2. Do some code changes on that branch, then "git add name-of-file-extension" "git commit -m "your message here"" "git push"
  3. I then move back to "master" or main/initial branch, "git checkout master"
  4. merge my new branch, "git merge new-branch"
  5. Then push/upload changes made in the branch, "git push"

No comments:

Post a Comment