Clone a specific branch. In this case the branch ‘develop’
git clone -branch develop <url>
Staging/Adding files and directories
git add . ---> Add all files in current directory git add ./path/to/folder ---> Add all files in specific directory git add test.txt ---> Add single file
Commit all added/staged files
git commit -m "Commit message"
Get Imal Kumarage’s stories in your inbox
Join Medium for free to get updates from this writer.
Create a new branch in local repository
git checkout -b branch_name
Pull master branch and merge with current local branch
git pull origin master
Push changes to branch in remote repository. (If no branch exists branch is created in remote)
git push origin branch_name
Fetches all remote refs (reference to remote branches)
git fetch
Checkout remote branch (As long as you have only one remote)
git checkout remote_branch_name
Untrack file/folder and remove from repository without deleting actual physical file