-
Github tutorialPython 2020. 9. 10. 23:28
Github Guide
Key Features
1. Setup your basic account (first-time user only).
git config --global user.name "danelee2601" git config --global user.email "danelee2601@naver.com"
2. Initialize.
git init
3. Setup remote connection as a nickname.
git remote add origin git@github.com:danelee2601/RepresentationLearning-TimeSeries.git
origin
is the nickname for the remote connection. You can check the registered remote connections bygit remote -v
. The address used here is SSH (reference), which allows you not to have to log-in at every push.If you're setting up a new repository, please check this out.
4. Branch control
- Change a branch name:
git branch -M main
; change the current branch name to 'main'. - Make a new branch:
git branch readme_edit
; a new branch name is 'readme_edit' - Access a certain branch:
git checkout readme_edit
5. Edit/add files/directories and "push" the update to the Github repository.
git add . git commit -m "write down the content of your update." git push origin branch_name
A. How to sync your GitHub to your local repository
git pull origin branch_name # or git fetch origin branch_name
- Difference between
pull
andfetch
is whether tomerge
or not. pull
=fetch
+merge
'Python' 카테고리의 다른 글
Regular Expression (0) 2020.09.11 jupyter notebook에 가상환경 kernel 추가하기 (0) 2020.09.11 Github Markdown tutorial (0) 2020.09.10 - Change a branch name: