update1:
right now I am facing conflicts when I do rebase. after I modify the code. Can you let me know what command to execute to remove the conflicts. Providing the status below
sports/code/file (branchB)
$ git pull --rebase origin branchA
From https://gitlab.sports.com
* branch branchA -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: wip html fixes
Using index info to reconstruct a base tree...
M sports/ajax.js
Falling back to patching base and 3-way merge...
Auto-merging sports/ajax.js
CONFLICT (content): Merge conflict in sports/ajax.js
error: Failed to merge in the changes.
Patch failed at 0001 wip html fixes
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
sports/code/file (branchB|REBASE 1/2)
$ git status
rebase in progress; onto 89898989892323
You are currently rebasing branch 'branchB' on '89898989892323'.
(fix conflicts and then run "git rebase --continue")
(use "git rebase --skip" to skip this patch)
(use "git rebase --abort" to check out the original branch)
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
both modified: sports/ajax.js
no changes added to commit (use "git add" and/or "git commit -a")
- I am trying to learn rebase.
- I have a branch A which is created from develop branch,
- from the branch A I created a new local branch B.
- i did a git rebase using this command
git pull --rebase origin A
- no if I do
git push -f origin B
will my code go into branch B alone or will it go into branch A also. - if I type git status in branch B I am seeing the below message.
- i followed this medium link https://medium.com/@gitaumoses4/git-rebase-a-tool-for-excellent-git-workflow-3aaa1bba40a4
- can you tell me how to fix it, so that in future I can do it myself
$ git status
On branch B
Your branch and 'origin/B' have diverged,
and have 7 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working directory clean