You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cd /dirname/
$ git clone [email protected]:user_name/repository_name.git
Create a new branch
$ git branch new_branch
Change git branch to the new_branch
$ git checkout new_branch
Coding, making commits, as usual…
$ git add .
$ git commit -m “Initial commit”
$ git push (pushes commits only to “new_branch”)
When job is finished on this branch, merge with “master” branch:
$ git merge master
$ git checkout master # (goes to master branch)
$ git merge development # (merges files in localhost. Master shouldn’t have any commits ahead, otherwise there will be a need for pull and merging code by hands!)
$ git push # (pushes all “new_branch” commits to both branches - “master” and “new_branch”)