bashsimplecurses icon indicating copy to clipboard operation
bashsimplecurses copied to clipboard

Git Rebasing Concerns

Open terminalforlife opened this issue 1 year ago • 2 comments

Sorry to make an Issue about this — I've nowhere else to really post it.

What's this project's stance on rebasing? I've used Git and GitHub for years, but I've never really rebased in Git before, until now. I'm actually really happy I discovered how to do it, but from looking online, it seems it can be very destructive if not done properly. That's why I'm posting here, to double-check.

I made 3 commits to my local fork of BSC, in preparation for another PR. These changes have not been pushed. I realised I missed something from the 1st commit, so I rebased back to the first commit, made the changes, then amended those changes to the commit. There were no conflicts and everything seemed to work successfully.

My concern is mainly that it'll somehow cause issues for y'all, since I don't yet properly understand rebasing. It strikes me that it'd be fine, because they were local changes and I didn't rebase to or before someone else's changes, but I'm not certain.

I'd rather be annoying and ask, than be quiet and make a mess. 😄

In order of events:

  1. Made changes. Made a commit.
  2. Made changes. Made a 2nd commit.
  3. Made changes. Made a 3rd commit.
  4. Realised I missed something in 1.
  5. Rebased to 1: git rebase -i SHA^
  6. In Vim, edited 'pick' to 'edit' for SHA.
  7. Made changes, then amended to commit: git commit --amend
  8. Continued the rebase: git rebase --continue

Maybe that'll help, in-case I didn't explain clearly.

I've looked online and git-rebase(1), but I either can't find anything concrete, or I frankly just don't understand.

terminalforlife avatar May 23 '23 19:05 terminalforlife