Bureaucrats, checkuser, Administrators
3,313
edits
No edit summary |
|||
Line 31: | Line 31: | ||
== Committing == | == Committing == | ||
First of all, create and edit the files as per usual. Now, to see to it that they're committed to the repo, do the following: | First of all, create and edit the files as per usual. You can what's changed by running: | ||
git status | |||
or | |||
git diff | |||
Now, to see to it that they're committed to the repo, do the following: | |||
git add file1.sh file2*.py data/file3.txt | git add file1.sh file2*.py data/file3.txt | ||
This tells git which files you want to commit the changes for. | This tells git which files you want to commit the changes for. Finally, use: | ||
git commit -m "A useful, but short, message on the changes" | git commit -m "A useful, but short, message on the changes" | ||
Line 41: | Line 49: | ||
This actually commits these changes, and attaches the comment after -m to the change to make it easy to see what changes you made at a glance. If you want to make a longer message, leave out -m, and you will be given a file in <code>vi</code> to edit. | This actually commits these changes, and attaches the comment after -m to the change to make it easy to see what changes you made at a glance. If you want to make a longer message, leave out -m, and you will be given a file in <code>vi</code> to edit. | ||
You should then check your commit history using: | |||
git log | git log |