en:uhsdr_dev:git

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
Last revisionBoth sides next revision
en:uhsdr_dev:git [13.03.2018 12:52] – github changes 2 df9ts_useren:uhsdr_dev:git [14.03.2018 07:36] df9ts_user
Line 14: Line 14:
    
 ==== Option: Use "git" on command line level, command line style ==== ==== Option: Use "git" on command line level, command line style ====
 +
 +A git cheat sheet can be found {{ :en:uhsdr_dev:git_cheat_sheet.pdf |here}}
  
 === Fork UHSDR to your own remote github repo === === Fork UHSDR to your own remote github repo ===
Line 35: Line 37:
   * Your github fork is now synchronised with DF8OE UHSDR main repo   * Your github fork is now synchronised with DF8OE UHSDR main repo
  
 +=== Creating branches for tests and experiments ===
 +Before creating any new branch please pull the changes from upstream as explained above. Make sure your forked repo is up to date.
  
 +  * Create the branch on your local machine and switch in this branch :<code>$ git checkout -b [name_of_your_new_branch]</code> 
 +  * Change working branch : <code>$ git checkout [name_of_your_new_branch]</code> 
 +  * Push the branch from local repo onto remote github : <code>$ git push origin [name_of_your_new_branch]</code> 
 +  * When you want to commit something in your branch, be sure to be in your branch. Add -u parameter to set upstream. To check current branch use <code>$ git branch</code> 
 +  * Add a new remote for your branch : <code>$ git remote add [name_of_your_remote]</code>  
 +  * Push changes from your commit into your branch : <code>$ git push [name_of_your_new_remote] [name_of_your_branch]</code> 
 +  * Update your branch when the original branch from official repository has been updated : <code>$ git fetch [name_of_your_remote]</code> 
 +  * Then you need to apply to merge changes, if your branch is derivated from develop you need to do : <code>$ git merge [name_of_your_remote]/develop</code> 
 +  * Delete a branch on your local filesystem : <code>$ git branch -d [name_of_your_new_branch]</code> 
 +  * To force the deletion of local branch on your filesystem : <code>$ git branch -D [name_of_your_new_branch]</code> 
 +  * Delete the branch on github : <code>$ git push origin :[name_of_your_new_branch]</code>
  
 === Use local UHSDR clone in Eclipse === === Use local UHSDR clone in Eclipse ===
  • en/uhsdr_dev/git.txt
  • Last modified: 16.03.2018 13:09
  • by df9ts_user