User Tools

Site Tools


start:github

Getting started with GitHub

Local settings

  1. Create an account on GitHub webpage
  2. Add personal ssh key (/home/user/.ssh/id_rsa.pub) into your personal account on the GitHub website
  3. Using terminal move into project folder and perform the command:
    git init
  4.  git remote add origin https://github.com/youruser/siman.git 
  5.  git pull --set-upstream origin master #(or branch e.g. simanaks) 
    1. check the current branches and what upstreams they have. Each branch should have a corresponding upstream on github
       git branch -vv 
    2. change upstream key -u is short for –set-upstream https://devconnected.com/how-to-set-upstream-branch-on-git
       git push -u origin master 
  6.  git config --global user.email "yourmail@gmail.com" 
  7.  git config --global user.name "your name" 
    1. remember authorization data and do not ask
       git config --global credential.helper store  

How to sync your branch with the main version of siman

  1. Add repository
    git remote add upstream https://github.com/dimonaks/siman.git 
  2. View all remote branches
     git remote -v 
  3. Download all branches
     git fetch upstream 
  4. внести изменения в свою папку
     git merge upstream/master 
    1. перезаписать свою локальную ветку:
      1.  git reset -- hard 
      2.  git merge upstream/master 

How to merge local branch into master and update on github

  1.  git checkout master 
  2.  git merge simanaks 
  3.  git push 

How to update your local version of SIMAN

  1. Safe way. Allows you to download the entire history and the latest version, but does not make changes.
     git fetch 

    Changes can be accepted manually using

     git merge 
  2. Non safe. Immediately updates the local version
     git pull 

Useful tips

  1. To use ssh access via console the address should be ssh and not http: git remote set-url origin git@github.com:<Username>/<Project>.git
  1. A good guide explaining how to work together, start with it. link
  2. Working with branches. link1 link2
  3. Synchronizing a fork with the main repository. link
  4. Cheat sheet for working with git. link
start/github.txt · Last modified: 2025/01/31 14:49 by a.boev

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki