Git 101
Jump to navigation
Jump to search
Basic commands
To ignore a file
.gitignore
contains the list of file to be ignore; to ignore a new file/folder, just add it to the list using a text editor.
To commit ALL tracked files
Use option -a
$ git commit -am 'commit message goes here' # single line message $ git commit -am 'Message # multi lines message $ $ goes $ here'
To commit ONE file
$ git add myfiletocommit # stage file for commit $ git commit myfiletocommit # commit file
To see the difference since last commit
$ git diff somefile
To push to remote repository
$ git push
To see the tracked files
To display files under version control:
$ git ls-files