git pull --rebase origin develop
What a useful command!
When you join develop team, you always use git.
But...
When you complete code and push it to remote repository, you look conflict message, so it slightly sad.
Then Whenever you use git pull --rebase origin develop
.
Condition
Development team must follow Git-Flow
.
It's branch strategy.
main branch
develop branch
feature branch
When use it
First you create new feature branch.
Second you're coding.
Third you enter git pull --rebase origin develop
, after Lunch.
So develop branch may have been updated.
It's also good when coding is done, you enter it.
If there is nothing else,
Successfully rebased and updated xxxx
OK, No Conflict.
Let's push it.
But you catch conflict message, you fix code.
You enter blow command after you fix it.
git add fixed file
You enter blow command.
git status
If it's no conflict,
nothing to commit, working tree clean
Ok, next you enter blow command, so you finish rebase.
git rebase --continue
If It's no problem,
Successfully rebased and updated xxxxxx
How about it?
It's easy way.
But you carefully research rebase
and pull
, so you use command.
Have a good engineer life.
Top comments (0)