A Few Steps to Create a Branch Locally and Merging with the remote existing Branch :
1. git branch -r => will display all the remote branches
2. git branch branch_name => create a new branch locally
3. git checkout branch_name => to switch to newly created branch
4.git fetch origin => fetch an entire remote
5.git merge origin/remote_branch_name => to merge the remote_branch with the newly created branch
6 git diff origin/remote_branch_name file_name =>if conflicts shows all the conflicts related to the files
7.git stash => if your changes can be ignored and will point to head
8.git merge origin/remote_branch_name
2 steps if you want to push the newly create branch in local to remote :
9. git push -u origin new_remote_branch_name
10. git remote -r => Find whether the newly created brach exist in remote.
1. git branch -r => will display all the remote branches
2. git branch branch_name => create a new branch locally
3. git checkout branch_name => to switch to newly created branch
4.git fetch origin => fetch an entire remote
5.git merge origin/remote_branch_name => to merge the remote_branch with the newly created branch
6 git diff origin/remote_branch_name file_name =>if conflicts shows all the conflicts related to the files
7.git stash => if your changes can be ignored and will point to head
8.git merge origin/remote_branch_name
2 steps if you want to push the newly create branch in local to remote :
9. git push -u origin new_remote_branch_name
10. git remote -r => Find whether the newly created brach exist in remote.
No comments:
Post a Comment