# Git :::info [TOC] ::: ## What's Git? Git is a free and open source **distributed version control system** designed to handle everything from small to very large projects with speed and efficiency.  > Expert from [NESI](https://support.nesi.org.nz/hc/en-gb/articles/360001508515-Git-Reference-Sheet) ### initialize ```shell= git init ``` ### ls/status ```shell= git status ``` ### add file ```shell= # git add <filename.extension> git add README.md ``` ### rm file ```shell= # git rm <filename.extension> git rm README.md ``` e.g: git rm helloWorld.cpp ### commit ```shell= # git commit -m "commit" git commit -m "Update" ``` ### log ```shell= git log ``` ### remote ```shell= # git remote add <remote-case> <site> git remote add origin https://github.com/{user}/hello-world.git ``` ### push **first push** ```shell= # git push -u <remote-case> <branch> git push -u origin master ``` > > -u = set branch & case default > **after the first push...** ```shell= git push ``` ### fetch ```shell= # git fetch <remote-case> git fetch origin ``` ### merge ```shell= # git head <older-branch> # git merge <newer-branch> git head origin git merge dev ``` ### pull ```shell= # git pull ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up