2

I want to redesign my Graphical User Interface in Visual Studio C#.I am using git bash for this purposes since I have a commit log of all my work. I entered the following command

git rebase -i HEAD~3

Then my notepad++ edit popped up since I configured that.Now I type edit before the commit message where I would do my redesigning of form after that git showed me two commands

git commit --amend
git rebase --continue

I entered git commit --amend and it again opened up my notepad++ form then I opened my visual studio form and redesigned the form after that I closd both my visual studio and notepad++ and typed git rebase --continue but it did not worked.

So my question is that in what point of time I should make changing in my Visual Studio Form?

Naseer
  • 4,041
  • 9
  • 36
  • 72

2 Answers2

2

When the rebasing pauses, you should do your changes. Then you add those changes like you usually do for a commit (using git add). But instead of committing them as a new commit, you amend the previous one using git commit --amend. This will change the commit you are currently editing.

After that, use git rebase --continue to continue rebasing and applying the later commits.

poke
  • 369,085
  • 72
  • 557
  • 602
  • Thank you very much indeed poke It was taking devil out me. – Naseer Apr 15 '14 at 09:32
  • Another problem I am facing is that In my sample project TestForm in visual studio which I am tracking from git bash,whenever I open or close my visual studio project using cancel button git status shows me the untracked file TestForm.suo why is that? and how to avoid it? – Naseer Apr 15 '14 at 09:51
  • 1
    `.suo` is a user-specific configuration file that is created by VisualStudio to keep track of some unimportant settings (like opened folders and stuff). You should add it to your `.gitignore`, so it doesn’t get recognized by Git. – poke Apr 15 '14 at 10:02
  • I checked in .gitignore it was already there then why it still keeps popping in git status? – Naseer Apr 16 '14 at 04:13
1

you should do your changes BEFORE the

git commit --amend

because "amend" means: take the changed and "amend" them to the last commit. Since you are in the process of rebasing; these changes will thus be applied on the commit where you are at that moment.

in summary:

  1. git rebase -i HEAD~3 (and choose "edit" to edit the commit you want)
  2. Do your changes in visual studio or wherever you want
  3. git commit --amend
  4. git rebase --continue
Chris Maes
  • 35,025
  • 12
  • 111
  • 136