First you need to install a git package on your PC. Then follow the given steps:
Overview:
This git structure has something called branches. These are basically your versions of the code. If you want to finalise these versions, you can merge them into the master branch. Note: Discuss with everyone before making changes to the master branch, going back after this step is very difficult.
The basic idea is you copy the file structure from an online repository ROV2019 to your PC. This is called cloning.
Next you make changes inside the file structure on your PC. E.g. you can add a file inside navigation / arms etc.
After that you add(explained later) everything to a standing directory. This directory is basically a temporary storage of a sort. (Files added are not permanent and can still be changed)
After this you commit(explained later) your changes. This means that all of your changes are now finalised and are ready to be uploaded online. Note: Please commit only to the branch of your name.
Finally, push(explained later) (ie upload) all the files online. Note: Please upload only to the branch of your name
The entire 'github' process can be broken down into 3 parts:
Cloning the repository
Making changes to your branch
'commit' and 'push' those changes to the repository
Cloning and pulling from the repository
Use git clone git@github.com:mrgk21/ROV2019.git to clone it. Cloning is basically copying all the files to your PC.
If you already have the files and just want to copy the current directory structure, use git pull origin master
Changing to your branch
Use git checkout <your-branch-name> to start working on your own branch.
Seeing all branches
Use git branch -a to see all the branches available. Your current branch will be highlighted. Note:: Do not work on the master branch.
Adding the changes
Use git add -A to add all the changes u made locally to the standing directory.
Committing the changes
Use git commit -m "description-of-changes" to finalise them.
Pushing the changes
Use git push -u origin <name-of-your-branch> to push all the changes
Merging the changes to the master branch
Note: Do this only after discussing the changes with everyone.
Sometimes the directory structure may get changed. E.g. Someone pushes a new directory like a new folder under navigation or a new file onto the master branch. In this case, the git wont let you push all your changes onto the master branch. To solve this, use:
Note: Do this only after discussing the changes with everyone.
Part 2: Project Management
Issues and milestones:
You can create issues into GitHub via the issues tab. These are basically the the things that need to be done.
Issues can have tags which basically helps categorising them.
You should assign yourself to an issue and your progress will be discussed weekly.
You can set milestones which basically track how many of a certain type of issues are completed. E.g. The power supply milestone has 2 issues which need to be completed before a deadline.
Note: Never delete an issue. Just close it instead.
Practices:
This section explains all the common habits we should follow while using issues and milestones. This makes it easier for everyone to understand and help each other.
Add related issues using #<issue-number> while creating/commenting on an issue.
Write a short summary of what you just did in your branch so its easier for everyone to understand.
Please use markdown to make documents easier to read. Its basically a way to auto-format your text.
Tag people related to the issue/comment/< for-anything-relevant >
Part 1: GitHub
Installing git:
First you need to install a git package on your PC. Then follow the given steps:
Overview:
master
branch. Note: Discuss with everyone before making changes to the master branch, going back after this step is very difficult.ROV2019
to your PC. This is called cloning.navigation
/arms
etc.add
(explained later) everything to a standing directory. This directory is basically a temporary storage of a sort. (Files added are not permanent and can still be changed)commit
(explained later) your changes. This means that all of your changes are now finalised and are ready to be uploaded online. Note: Please commit only to the branch of your name.push
(explained later) (ie upload) all the files online. Note: Please upload only to the branch of your nameThe entire 'github' process can be broken down into 3 parts:
Cloning and pulling from the repository
Use
git clone git@github.com:mrgk21/ROV2019.git
to clone it. Cloning is basically copying all the files to your PC. If you already have the files and just want to copy the current directory structure, usegit pull origin master
Changing to your branch
Use
git checkout <your-branch-name>
to start working on your own branch.Seeing all branches
Use
git branch -a
to see all the branches available. Your current branch will be highlighted. Note:: Do not work on themaster
branch.Adding the changes
Use
git add -A
to add all the changes u made locally to the standing directory.Committing the changes
Use
git commit -m "description-of-changes"
to finalise them.Pushing the changes
Use
git push -u origin <name-of-your-branch>
to push all the changesMerging the changes to the master branch
Note: Do this only after discussing the changes with everyone.
Errors:
navigation
or a new file onto the master branch. In this case, the git wont let you push all your changes onto the master branch. To solve this, use:Note: Do this only after discussing the changes with everyone.
Part 2: Project Management
Issues and milestones:
power supply
milestone has 2 issues which need to be completed before a deadline.Note: Never delete an issue. Just close it instead.
Practices:
This section explains all the common habits we should follow while using issues and milestones. This makes it easier for everyone to understand and help each other.
#<issue-number>
while creating/commenting on an issue.markdown
to make documents easier to read. Its basically a way to auto-format your text.