10-30-2015, 11:40 PM
(10-30-2015, 11:21 PM)Jim_Clonk Wrote: I just did a tutorial on how to use git.
I have learned almost nothing.
git init
create a git repository in the pwd (present working directory)
git clone <source>
clone a git repository from another source to the pwd
git add <file>
start tracking a file (or files) under a git repository. Responsive to command line syntax so *.c would track all c source files in the directory for instance
git commit <file> -m 'message'
commit changes to a file (or files) and tag them with a descriptive message with the -m option followed by a string 'message'
git status <options>
shows the status of git files in the repository
git push <destination> <source>
push a git repository or branch from the source to a destination (eg. push a local repository to an online service like github)
git tag <tagname>
create a descriptive tag which identifies the current build
git checkout <commit or build>
get a specified commit or build from a repository
For simple purposes you are mostly interested in the first four: git init/clone to get an existing repository or start one, git add to start tracking files and git commit to commit changes made to files. This is kinda oversimplified and you can do a lot more with git but this should help with the basics