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 Answer 1

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.

Sign up to request clarification or add additional context in comments.

4 Comments

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.
once the file/folder is added to the repo, git tracks its changes as it should. edit: git-scm.com/book this book is quite good for getting into git fast
I recommend Git Magic book too. www-cs-students.stanford.edu/~blynn/gitmagic
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: stackoverflow.com/questions/6063944/… (although this is 3 years old and TortoiseGit has come a long way, so perhaps someone can correct me).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.