Git is software for tracking changes
in any set of files, usually used for coordinating work
among programmers collaboratively developing source code during software development. Its goals include speed
, data integrity
, and support for distributed, non-linear workflows
.
Configures user information used across all local repositories. Set a name that is identifiable for credit when review version history.
git config --global user.name "username"
Set an email address that will be associated with each history marker.
git config --global user.email "email"
Initializes an existing directory as Git repository (.git directory)
git init
Set up the remote repository
git remote add origin https://github.com/UserName/RepositoryName.git
Check the current remote
git remote -v
Pull from origin
git pull origin brach_name
Force push to origin
git push origin +branch_name --force
Create a branch or switch to a branch
git checkout -b [branch_name]
Rename a branch
git branch -m <oldname> <newname>
Delete a branch from local :
git branch -d [branch_name]
Force delete from local :
git branch -D [branch_name]
Show all commits of a repository
git log