start:github
Table of Contents
Getting started with GitHub
Local settings
- Create an account on GitHub webpage
- Add personal ssh key (/home/user/.ssh/id_rsa.pub) into your personal account on the GitHub website
- Using terminal move into project folder and perform the command:
git init
git remote add origin https://github.com/youruser/siman.git
git pull --set-upstream origin master #(or branch e.g. simanaks)
- check the current branches and what upstreams they have. Each branch should have a corresponding upstream on github
git branch -vv
- change upstream key -u is short for –set-upstream https://devconnected.com/how-to-set-upstream-branch-on-git
git push -u origin master
git config --global user.email "yourmail@gmail.com"
git config --global user.name "your name"
- remember authorization data and do not ask
git config --global credential.helper store
How to sync your branch with the main version of siman
- Add repository
git remote add upstream https://github.com/dimonaks/siman.git
- View all remote branches
git remote -v
- Download all branches
git fetch upstream
- внести изменения в свою папку
git merge upstream/master
- перезаписать свою локальную ветку:
git reset -- hard
git merge upstream/master
How to merge local branch into master and update on github
git checkout master
git merge simanaks
git push
How to update your local version of SIMAN
- 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
- Non safe. Immediately updates the local version
git pull
Useful tips
- 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
Useful links
start/github.txt · Last modified: 2025/01/31 14:49 by a.boev