As I write in a .txt file, how do I keep track of the changes? This will be from the creation of the file until I'm finished with it. Does the file need to be in a certain place? Special commands required? I have never used open source management software before, so as much advice as you have to spare would be welcome.
-
what operating system are you using? – Winston Ewert Nov 25 '10 at 02:15
-
I suggest you might try http://git-scm.com/ or try searching SO (http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide) before asking questions like this. – user160917 Nov 25 '10 at 02:28
2 Answers
I suggest to read the Git Book then.
You have to
Initialize your repository
cd folder git init
Create and add files
vim file.txt git add file.txt
Commit changes
git commit -m"Added some more lines"
Repeat steps 2 and 3 whenever you make changes to your file(s) and want to add them to your repository.
But: You really have to read a tutorial before and get familiar with the basic commands. You don't have to create a git repository at a certain place, any folder will do.

- 795,719
- 175
- 1,089
- 1,143
You just have to create a repository and add the file to it. A simple command list can be found here.
All you'd do would be something like the following in an empty directory containing your text file only:
git init .
git add mytextfile.txt
Then, every time you'd like to commit/save current changes or the current version of the file, type:
git commit
or (to add a commit message that can be seen in the commit/version history later on)
git commit -m "Added chapter 5"

- 35,726
- 5
- 62
- 78
-
No, when you only type `git commit` then the default editor opens. If you don't add any text, then the commit is not created. – Felix Kling Nov 26 '10 at 00:25