Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:manual:contrib:git_contribution_guide [2022/03/28 02:58] i3_relativism further editing |
en:manual:contrib:git_contribution_guide [2023/02/21 10:35] i3_relativism [Edit, add and remove files] |
||
---|---|---|---|
Line 1: | Line 1: | ||
<note warning> This page is still in progress, so please dont aprove this draft yet!</ | <note warning> This page is still in progress, so please dont aprove this draft yet!</ | ||
- | ====== | + | ====== |
- | + | ||
- | < | + | |
===== SSH ===== | ===== SSH ===== | ||
Line 12: | Line 9: | ||
ssh -p 51100 < | ssh -p 51100 < | ||
</ | </ | ||
+ | |||
+ | < | ||
==== Comands ==== | ==== Comands ==== | ||
Line 21: | Line 20: | ||
* ' | * ' | ||
- | # type the command make for example | + | type the command |
- | # when it says Please specify the address of the Git repository: | + | when it says < |
- | # its asking for the folder name | + | |
- | # for example | + | for example |
- | # like guide.git were i have uploaded my file | + | |
- | # then it prints Please specify the name of the Git repository: | + | to create " |
- | # you cant type: " | + | |
- | # to create " | + | <code bash> |
+ | guide | ||
+ | </code> | ||
To create folders in your local machine, open your terminal and type as follow: | To create folders in your local machine, open your terminal and type as follow: | ||
Line 38: | Line 39: | ||
To end up create these folders: | To end up create these folders: | ||
+ | <code bash> | ||
# GIT/ | # GIT/ | ||
# GIT/ | # GIT/ | ||
Line 43: | Line 45: | ||
# GIT/ | # GIT/ | ||
# GIT/ | # GIT/ | ||
+ | </ | ||
+ | |||
+ | ===== Clonning repos ===== | ||
Now go to team/ | Now go to team/ | ||
Line 50: | Line 55: | ||
</ | </ | ||
- | [x@localhost packages]$ | + | Clone the repositories |
- | Clone the repositories: | + | |
<code bash> | <code bash> | ||
Line 58: | Line 62: | ||
</ | </ | ||
- | Then cd to the extra repository: | + | ===== Create your branch ===== |
+ | |||
+ | cd (=change directory) into to the extra repository: | ||
<code bash> | <code bash> | ||
Line 67: | Line 73: | ||
<code bash> | <code bash> | ||
- | git branch < | + | git branch < |
git checkout < | git checkout < | ||
</ | </ | ||
+ | |||
+ | ===== Edit, add and remove files ====== | ||
Create the files you want to add to extra repository and type: | Create the files you want to add to extra repository and type: | ||
<code bash> | <code bash> | ||
- | git add file1 file2 | + | git add . |
- | git commit -m "Add your commit comment here" | + | |
- | | + | |
</ | </ | ||
- | |||
- | <note tip>This is used to add all commits, -am might also be used to do both at the same time</ | ||
<code bash> | <code bash> | ||
- | git commit -a -m "Add your commit comment here" | + | git commit -sam "Add your commit comment here" |
</ | </ | ||
- | To push and pull from the team repository make these changes inside team/ | ||
- | === Change < | + | |
+ | <note tip>To push and pull from the team repository make these changes inside team/ | ||
+ | |||
+ | ==== Change < | ||
<code bash> | <code bash> | ||
Line 102: | Line 108: | ||
remote = origin | remote = origin | ||
merge = refs/ | merge = refs/ | ||
- | [branch " | ||
- | remote = origin | ||
- | merge = refs/ | ||
[branch "< | [branch "< | ||
remote = origin | remote = origin | ||
Line 117: | Line 120: | ||
</ | </ | ||
- | To merge commits | + | To merge commits |
<code bash> | <code bash> | ||
- | git checkout | + | git checkout < |
- | git merge < | + | git merge master |
</ | </ | ||
Line 127: | Line 130: | ||
<code bash> | <code bash> | ||
- | git push origin master | + | git push # to push commits |
</ | </ | ||
+ | |||
+ | ===== Reverting commits ===== | ||
We countinue with more git commands | We countinue with more git commands | ||
Line 139: | Line 144: | ||
git revert $commit_checksum | git revert $commit_checksum | ||
</ | </ | ||
- | |||
- | === Git Revert === | ||
If you would revert this commit -> https:// | If you would revert this commit -> https:// | ||
Line 159: | Line 162: | ||
git push --force | git push --force | ||
</ | </ | ||
+ | |||
+ | ===== Rebasing codebase ===== | ||
However, please don't use this command in master, for that reason i'm insisting for each user to create their own branches. | However, please don't use this command in master, for that reason i'm insisting for each user to create their own branches. | ||
Line 167: | Line 172: | ||
git push origin master && git push origin < | git push origin master && git push origin < | ||
</ | </ | ||
+ | |||
+ | ===== Pushing changes ===== | ||
Remember to push those commits to master and milky-way-v0.4 branches if you consider those ones stable and tested by you first because I will pull them to our build server to build and push to repos. | Remember to push those commits to master and milky-way-v0.4 branches if you consider those ones stable and tested by you first because I will pull them to our build server to build and push to repos. | ||
Line 175: | Line 182: | ||
</ | </ | ||
- | ==== Conclusion ==== | + | ====== Conclusion |
So, in short, you have 2 ways to push your commits: | So, in short, you have 2 ways to push your commits: | ||
Line 183: | Line 190: | ||
=== Aknowlegments === | === Aknowlegments === | ||
Hyperbola Development Team git repository use: | Hyperbola Development Team git repository use: | ||
+ | Copyright 2021 rachad | ||
Copyright 2021 André Silva | Copyright 2021 André Silva | ||
Copyright 2021 Quiliro Ordóñez | Copyright 2021 Quiliro Ordóñez | ||
- | Copyright 2021 rachad | ||
GNU Free Documentation License | GNU Free Documentation License |