- What is Git?
- What are ‘branches’?
- Getting Started
Your usual day-to-day Git tasks will usually just involve getting the latest work from the remote, and otherwise pushing your local work to the remote. These tasks are written line-by-line in the Git Bash as follows:
- Clone a project from the remote for the first time:
git clone git@server:namespace/project.git
- Create a branch:
git checkout -b feature/branch_name git push --set-upstream origin feature/branch_name
- Commit your work:
git add * git commit -m "This is a commit message" git push
- Switch to a different, existing branch:
git checkout feature/branch_name git pull
- Delete a branch
git branch -D feature/branch_name git push origin :feature/branch_name
For a more complete guide on common Git tasks via the command line, see my guide: Common Git Commands.