2

I'm just beginning to use TortoiseGit for Windows (I'm new to git) and I don't see the Add command in the context menu when I right-click on a directory or file. As I understand it, I should run this addcommand each time I want an update to a local file to be "staged". Here I don't see such a thing, the only "similar" thing I can do is run a commit instead, which is obviously not the right thing to do.

Besides, when I create a new file I also want to add it, but the context menu only proposes to "Add to ignore list".

Am I missing something here?

1 Answers1

3

You can add a file or folder to a git repository by right-clicking on it, then in "TortoiseGit"-submenu select "Add.." (should be the first menuitem, right above the "Add to ignore list"-submenu).

Anyway... another way of staging files or folders via TortoiseGit is to right-click the repository > TortoiseGit > Check for modifications > select the filed/folders you wish to stage from the list of not versioned files > right-click > add.

Felix Bayer
  • 363
  • 2
  • 11
  • Thanks, it seems to work now. Just one question: when I modify a staged file, does the new file automatically replace the old file on the stage? I thought I had to `add` it manually. – Nicolas Le Thierry d'Ennequin Jan 31 '13 at 15:05
  • once the file/folder is added to the repo, git tracks its changes as it should. edit: http://git-scm.com/book this book is quite good for getting into git fast – Felix Bayer Jan 31 '13 at 15:10
  • I recommend Git Magic book too. http://www-cs-students.stanford.edu/~blynn/gitmagic/ – Łukasz Siwiński Feb 04 '13 at 12:37
  • This answer confused me a bit, but because I was asking the wrong question. This answer is what I was looking for - you can't really interact with the staging area with TortoiseGit: http://stackoverflow.com/questions/6063944/can-you-interact-with-the-index-staging-area-with-tortoisegit (although this is 3 years old and TortoiseGit has come a long way, so perhaps someone can correct me). – Chris Jun 12 '14 at 16:14