question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Confusion about `git rebase` in the Gitflow part of doc

See original GitHub issue

Hey. 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GeekaholicLincommented, Aug 13, 2017

😂 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~

0reactions
vpanjganjcommented, Aug 13, 2017

So according to the link:

It works by going to the common ancestor of the two branches (the one you’re on and the one you’re rebasing onto), getting the diff introduced by each commit of the branch you’re on, saving those diffs to temporary files,

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.

resetting the current branch to the same commit as the branch you are rebasing onto,

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.”

and finally applying each change in turn. Now your feature commits gets applied on top. And you have a updated feature branch.

To be honest you gave me doubts too 😄

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found