1

I am new to git. I have 10 commits (git status shows I am ahead of origin/master by 10) with lots of code. I have not pushed yet. After committing changes I did a git pull, resolved all conflicts and then git add and then git commit again which was a big commit.

I now want:

1) other people to view and git pull my work from a new branch and not from master.

2) to start working on another feature from the latest "master" code that does not have my committed changes and be able to push them to master

3) I then later want come back to my current committed unpushed changes and be able to make modifications and eventually push them to master.

Move the most recent commit(s) to a new branch with Git does not answer my question as it does not show how other people can git pull my changes plus looks like it has some complications related to --rebase.

bsobaid
  • 955
  • 1
  • 16
  • 36
  • Actually the top answer on the issue you linked is quite simple and straightfarward, no rebasing or anything. Remember that a branch is simply a pointer to a commit. So, you create a new local branch pointing to your current commit, reset your master branch back to the commit you wish, and then push your new branch. – yossiz74 Oct 30 '19 at 12:22

0 Answers0