git tips

Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

clone repository

git clone

update repository

git pull

add file

git add <file>

remove file

git rm <file>

list branch

git branch

change the repository

git checkout <repository>

commit

git commit -m "description" <file>
git status
git push

git logs

git log --decorate=short

git logs

git log --oneline

new branch

git checkout -b patch1
git push origin patch1