Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:manual:contrib:git_contribution_guide [2022/03/26 19:23] i3_relativism add boxed for code bits |
en:manual:contrib:git_contribution_guide [2023/02/22 20:23] i3_relativism remove wip note on top |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | <note warning> This page is still in progress, so please dont aprove this draft yet!</ | + | ====== |
- | ====== | + | ===== SSH ===== |
- | == were < | + | == for the remote git management you have these two commands: == |
- | + | ||
- | ===== Small Contribution(git) Guide ===== | + | |
- | + | ||
- | === for the remote git management you have these two commands: | + | |
<code bash> | <code bash> | ||
Line 13: | Line 9: | ||
</ | </ | ||
- | # with ssh to team or your repo you can only use 4 commands | + | < |
- | # " | + | |
- | # ' | + | |
- | # ' | + | |
- | # ' | + | |
- | # type the command make for example | + | |
- | # wen it says Please specify the address of the Git repository: | + | |
- | # its asking for the folder name | + | |
- | # for example " | + | |
- | # like guide.git were i have uploaded my file | + | |
- | # then it prints Please specify the name of the Git repository: | + | |
- | # you cant type: " | + | |
- | # to create " | + | |
- | # in your local machine | + | ==== Comands ==== |
- | # open your terminal and type: | + | |
+ | with ssh to team or your repo you can only use 4 commands: | ||
+ | * " | ||
+ | * ' | ||
+ | * ' | ||
+ | * ' | ||
+ | |||
+ | type the command < | ||
+ | when it says <color # | ||
+ | |||
+ | for example <color # | ||
+ | |||
+ | to create " | ||
+ | |||
+ | <code bash> | ||
+ | guide | ||
+ | </ | ||
+ | |||
+ | To create folders | ||
<code bash> | <code bash> | ||
Line 34: | Line 36: | ||
</ | </ | ||
- | # to end up creating | + | To end up create |
+ | |||
+ | <code bash> | ||
# GIT/ | # GIT/ | ||
# GIT/ | # GIT/ | ||
Line 40: | Line 44: | ||
# GIT/ | # GIT/ | ||
# GIT/ | # GIT/ | ||
+ | </ | ||
+ | |||
+ | ===== Clonning repos ===== | ||
- | # now cd to team/ | + | Now go to team/ |
<code bash> | <code bash> | ||
Line 47: | Line 54: | ||
</ | </ | ||
- | # | + | Clone the repositories |
- | # Clone the repositories: | + | |
<code bash> | <code bash> | ||
Line 55: | Line 61: | ||
</ | </ | ||
- | # then cd to the extra repository: | + | ===== Create your branch ===== |
+ | |||
+ | cd (=change directory) into to the extra repository: | ||
<code bash> | <code bash> | ||
Line 61: | Line 69: | ||
</ | </ | ||
- | # To create your own branch in team git: | + | And create your own branch in team git: |
<code bash> | <code bash> | ||
- | git branch < | + | git branch < |
git checkout < | git checkout < | ||
</ | </ | ||
- | # create | + | ===== Edit, add and remove files ====== |
+ | |||
+ | Create | ||
<code bash> | <code bash> | ||
- | git add file1 file2 | + | git add . |
- | git commit -m "Add your commit comment here" | + | |
- | git commit -a -m "Add your commit comment here" | + | |
</ | </ | ||
- | # to push and pull from the team repository make these changes inside team/ | + | <code bash> |
- | # change | + | git commit -sam "Add your commit comment here" |
+ | </code> | ||
+ | |||
+ | |||
+ | <note tip>To push and pull from the team repository make these changes inside team/ | ||
+ | |||
+ | ==== Change < | ||
+ | |||
+ | <code bash> | ||
[core] | [core] | ||
repositoryformatversion = 0 | repositoryformatversion = 0 | ||
Line 91: | Line 107: | ||
remote = origin | remote = origin | ||
merge = refs/ | merge = refs/ | ||
- | [branch " | ||
- | remote = origin | ||
- | merge = refs/ | ||
[branch "< | [branch "< | ||
remote = origin | remote = origin | ||
merge = refs/ | merge = refs/ | ||
+ | </ | ||
- | # to push and pull commits type | + | To push and pull commits type |
<code bash> | <code bash> | ||
Line 105: | Line 119: | ||
</ | </ | ||
- | # to merge commits | + | To merge commits |
<code bash> | <code bash> | ||
- | git checkout | + | git checkout < |
- | git merge < | + | git merge master |
</ | </ | ||
- | # then you can push to remote master branch | + | Then you can push to remote master branch |
<code bash> | <code bash> | ||
- | git push origin master | + | git push # to push commits |
</ | </ | ||
- | ## we countinue with more git commands | + | ===== Reverting commits ===== |
+ | |||
+ | We countinue with more git commands | ||
<code bash> | <code bash> | ||
Line 128: | Line 144: | ||
</ | </ | ||
- | # If you would revert this commit -> https:// | + | If you would revert this commit -> https:// |
- | # you should run: | + | |
+ | you should run: | ||
<code bash> | <code bash> | ||
Line 137: | Line 154: | ||
< | < | ||
- | # If it comes from your own branch (no master please!) you could run: | + | If it comes from your own branch (not in master, please!) you could run: |
<code bash> | <code bash> | ||
Line 145: | Line 162: | ||
</ | </ | ||
- | # However, please don't use this command in master, for that reason i'm insisting for each user to create their own branches. | + | ===== 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. | ||
<code bash> | <code bash> | ||
Line 153: | Line 172: | ||
</ | </ | ||
- | # 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. | + | ===== Pushing changes ===== |
- | # You have your own user repo to make experimental things there. | + | |
+ | 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. | ||
+ | You have your own user repo to make experimental things there. | ||
<code bash> | <code bash> | ||
Line 160: | Line 181: | ||
</ | </ | ||
- | # So, in short, you have 2 ways to push your commits: | + | ====== Conclusion ====== |
- | # 1) your own repo for experimental reasons and then, | + | |
- | # 2) branches for testing | + | |
- | Aknowlegments | + | So, in short, you have 2 ways to push your commits: |
+ | * your own repo for experimental reasons and then, | ||
+ | * branches for testing | ||
+ | |||
+ | === 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 | ||
- |