Confusion about `git rebase` in the Gitflow part of doc
See original GitHub issueHey. Thanks for your awesome project guidlines.
In the en doc, there is one step in the Gitflow that maked me confused when I polished the zh one.
Update your feature branch with latest changes from develop by interactive rebase. git checkout <branchname> git rebase -i --autosquash develop
To my certain knowledge which may be wrong, the git rebase -i --autosquash develop
command is used to update develop branch with the changes you have make in the feature branch. Did I misunderstand it? Look forward to your reply.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Git Team Workflows Best Practices: Merge or Rebase?
In git, there are two ways to handle changes made by multiple developers on the same file: merge and rebase. Learn the pros...
Read more >git feature rebase should pull from origin/develop prior to ...
Currently git flow feature rebase just updates the current feature branch with your local copy of develop. I think this command should ...
Read more >Git Flow Confusion On Release Branch - Stack Overflow
I had to merge an empty commit with no diff. Git was smart enough to recognise that no actual changes were needed, even...
Read more >A Rebase Workflow for Git - RandyFay.com
The fundamental idea of rebasing is that you make sure that your commits go on top of the "public" branch, that you "rebase"...
Read more >gitworkflows Documentation - Git
Don't be afraid of making too small or imperfect steps along the way. You can always go back later and edit the commits...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
😂 I am so sorry. And thanks a lot! I think I know the whole work flow now. Update the feature branch and push it using
-f
to remote like github.And in the remote, make pull request so that the feature branch can be merged into develop branch.And I made a mistake thinking the current working branch is develop but acturally the feature one.Therefore, we must use
-f
to update the remote feature branch .OK, And this issue can be closed.Thanks~
So according to the link:
This is all the new feature stuff you’ve done so far. It puts it on a side. Now your feature branch looks like an old base branch.
your feature branch (that looks like old base branch) now takes all the commits it has missed out. “rebasing re-writes the project history by creating brand new commits for each commit in the original branch.”
To be honest you gave me doubts too 😄