Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous 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:26]
throgh [Clonning repos]
Line 1: Line 1:
-<note warning> This page is still in progress, so please dont aprove this draft yet!</note> +====== Git Contribution Guidelines ====== 
-====== Hyperbola Source Contribution Guidelines ======+===== SSH =====
  
-== were <user> its your username eg: newcontributor == +== 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:
 </code> </code>
  
-# with ssh to team or your repo you can only use 4 commands +<note><user> its your username egnewcontributor</note>
-# "list" is for listing repositories +
-# 'description' for adding a description or a title to that repo +
-# 'make' to create a repository +
-# 'remove' to remove +
-# 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 "documentation" is the folder for many repositories +
-# like guide.git were i have uploaded my file +
-# then it prints Please specify the name of the Git repository: +
-# you cant type: "guide" +
-# to create "documentation/guide.git" in the remote repo team or <user>+
  
-# in your local machine Create folders as follow: +==== Comands ==== 
-open your terminal and type:+ 
 +with ssh to team or your repo you can only use 4 commands: 
 +  * "list" is for listing repositories 
 +  * 'description' for adding a description or a title to that repo 
 +  * 'make' to create a repository 
 +  * 'remove' to remove 
 + 
 +type the command <color #0B71B9/#DDF1FF>'make'</color> for example 
 +when it says  <color #B90B0B/#FFDDDD>'Please specify the address of the Git repository'</color> its asking for the folder name 
 + 
 +for example <color #0B71B9/#DDF1FF>'documentation'</color> is the folder for many repositories like guide.git were i have uploaded my file then it prints Please specify the name of the Git repository: 
 + 
 +to create "documentation/guide.git" in the remote repo team or <user>, you cant type:  
 + 
 +<code bash> 
 +guide 
 +</code> 
 + 
 +To create folders in your local machineopen your terminal and type as follow:
  
 <code bash> <code bash>
Line 34: Line 36:
 </code> </code>
  
-# to end up creating these folders+To end up create these folders
 + 
 +<code bash>
 # GIT/team/documentation # GIT/team/documentation
 # GIT/team/hyperbolabsd # GIT/team/hyperbolabsd
Line 40: Line 44:
 # GIT/team/services # GIT/team/services
 # GIT/team/software # GIT/team/software
 +</code>
 +
 +===== Cloning repositories =====
  
-# now cd to team/packages:+Now go to team/packages:
  
 <code bash> <code bash>
Line 47: Line 54:
 </code> </code>
  
-#[x@localhost packages]$  +Clone the repositories core and extra:
-Clone the repositories:+
  
 <code bash> <code bash>
Line 55: Line 61:
 </code> </code>
  
-# 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:
 </code> </code>
  
-# To create your own branch in team git:+And create your own branch in team git:
  
 <code bash> <code bash>
-git branch <user>   # example "git branch quiliro" to create a new branch+git branch <user>   # to create a new branch
 git checkout <user>   # to switch to your branch git checkout <user>   # to switch to your branch
 </code> </code>
  
-# create the files you want to add to extra repository and type: +===== Edit, add and remove files ====== 
 + 
 +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" +
-git commit -a -m "Add your commit comment here"  #this is used to add all commits+
 </code> </code>
  
-# to push and pull from the team repository make these changes inside team/packages/extra/.git/config  +<code bash> 
-# change <userto your username:+git commit -sam "Add your commit comment here" 
 +</code>
  
 +
 +
 +<note tip>To push and pull from the team repository make these changes inside team/packages/extra/.git/config </note>
 +
 +==== Change <user> to your username: ====
 +
 +<code bash>
 [core] [core]
  repositoryformatversion = 0  repositoryformatversion = 0
Line 91: Line 107:
  remote = origin  remote = origin
  merge = refs/heads/master  merge = refs/heads/master
-[branch "milky-way-v0.4"] 
- remote = origin 
- merge = refs/heads/milky-way-v0.4 
 [branch "<user>"] [branch "<user>"]
  remote = origin  remote = origin
  merge = refs/heads/<user>  merge = refs/heads/<user>
 +</code>
  
-# to push and pull commits type+To push and pull commits type
  
 <code bash> <code bash>
Line 105: Line 119:
 </code> </code>
  
-# to merge commits to the master branch +To merge commits from master branch 
  
 <code bash> <code bash>
-git checkout master  +git checkout <user> 
-git merge <user>+git merge master
 </code> </code>
  
-# then you can push to remote master branch+Then you can push to remote master branch
  
 <code bash> <code bash>
-git push origin master   # to push commits to the master branch +git push   # to push commits in the current branch
 </code> </code>
  
-## we countinue with more git commands+===== Reverting commits ===== 
 + 
 +We countinue with more git commands
  
 <code bash> <code bash>
Line 128: Line 144:
 </code> </code>
  
-If you would revert this commit -> https://git.hyperbola.info:50100/packages/extra.git/commit/?id=85b468a2c03371c4e3550a0ddc529a9df376e6ae +If you would revert this commit -> https://git.hyperbola.info:50100/packages/extra.git/commit/?id=85b468a2c03371c4e3550a0ddc529a9df376e6ae 
-you should run:+ 
 +you should run:
  
 <code bash> <code bash>
Line 137: Line 154:
 <note>It will generate a new commit by reverting your commit.</note> <note>It will generate a new commit by reverting your commit.</note>
  
-If it comes from your own branch (no master please!) you could run:+If it comes from your own branch (not in masterplease!) you could run:
  
 <code bash> <code bash>
Line 145: Line 162:
 </code> </code>
  
-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:
 </code> </code>
  
-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.  You could use forced commands such as:+ 
 +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.  You could use forced commands such as:
  
 <code bash> <code bash>
Line 160: Line 181:
 </code> </code>
  
-# 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
-