Git Basics¶
Note
This section is only relevant for future developers to the CSC-ATAMO Dusty project.
This section will not go into the details of git, there are better
tutorials online that can be read.
This tutorial will be tailored for this project.
Setup¶
With git installed on your system, clone the repo;
$ git clone https://github.com/kjph/c7c-atamo-dusty.git
$ cd c7c-atamo-dusty
Workflow¶
The workflow used for this project will be basic.
Despite this, it is still recommended to read up on the basic git workflows.
A daily build process is provided below:
git pullto update your local repository with the Github repositoryMerge any conflicting changes if required (or ask a more senior dev.)
git logto review changes to ensure you’re up to speed and understand the changesMake your local changes;
git addto stage changesgit committo save changes into your local repository
git pushto ensure your local repository is the same with the server repository (update refs)Repeat
Git Theory¶
git rookies often wonder why there are three different commands (add, commit, push) which all
sound like they do the same thing.
They don’t (obviously).
Recommended reading to clear-up these:
- Git: Git Basics.
- Stackoverflow: What are the differences between git-commit and git-push.
- Stackexchange (software engineering): what does stage mean in git.