Git and Github
Git and Github
git
git is a version control system
Commonly used by large code development projects to track and commit
changes/additions to the codebase.
That’s it!
Adding les to the repository
git doesn’t assume that all les in the directory should be committed to the repository, you must
add them. To get a listing of both tracked and untracked les.
Leave o the -m and your $EDITOR will open for you to include a longer commit message. To
commit all modi ed les already tracked in the repository without explicitly using git add use
the -a option
Write your commit message in the present tense: "Fix bug" and not
"Fixed bug."
Example .gitignore le
# Ignore emacs backup files:
*~
This removes file.txt completely from your disk, same as regular UNIX rm
If you only want to remove a le from the git repository, but leave it in your working directory
use:
The daa8d81f is a hash string that identi es the commit, it can be seen with git log
Going back while trashing changes
To permanently trash your changes and get back the most recent commit
To get back a previous commit and trash all commits that happened after
Will clone my dotvim repository to a folder in ~ named .vim This repository becomes local, i.e.
you can make changes and local commits.
origin is the default remote repo name and master is the default branch name.
Pushing to remote repositories
To push changes to a remote repository, any local changes must be rst commited locally as
usual:
Similar services
https://bitbucket.org
https://gitlab.com