-1

Apologies if its a newbie like question, I am relatively new to gitHub (using SVN for a long time)

This may be related to a similar post (see "going to a commit then returning to the present" ) but I am hoping for a quick response to the following:

  1. I pulled a specific commit off master from my git repository using

    git checkout a1b2c3

  2. Then I created a branch off that specific commit using

    git branch specificCommitBranchName a1b2c3

  3. Then, I did some work on those files.

If I do git push and commit my changes (or use git GUI, whatever) where do those commits go? Does it go to that commit? does it only commit locally (and not to the remote repo / that commit ? ) to master? I'd like to commit my changes for now basically, then eventually re-merge my changes with the latest master HEAD.

I appreciate your answers, thanks!

Community
  • 1
  • 1
DJ Eddie J
  • 101
  • 1
  • 2
  • 12

1 Answers1

1

It will create another commit on top of that commit you're using, and it will push it into a new branch.

If you want to modify the existing commit, use command git commit --amend

pelya
  • 4,326
  • 2
  • 24
  • 23