Skip to content
Yulei Sui edited this page Nov 4, 2018 · 9 revisions

1. Set up your git names

git clone https://github.com/SVF-tools/SVF.git
git config --global user.name "Your name"
git config --global user.email "youremail@gmail.com"

2. Git status (any local new changes) and log (commit history of your local repo)

git status
git log

3. Git pull from your repo

git pull

4. Add your changes, commit and push to your repo

git add your_file
git commit -m "comments"
git push

5. Git reset to HEAD (remove a file from your commit file list)

git reset HEAD yourfile

6. Git pull from a remote repo

git remote add upstream https://github.com/SVF-tools/SVF.git
git pull upstream master
git push origin master   # push to your repo once after your pull from a remote repo

7. Git push to a remote repo

git remote add upstream https://github.com/SVF-tools/SVF.git
git push upstream master

8. Make pull request from private repo to a public one

git clone https://github.com/SVF-tools/SVF.git
cd public-repo
git remote add private_repo_yourname https://github.com/yuleisui/SVF.git
git checkout -b pull_request_yourname
git pull private_repo_yourname master
git push origin pull_request_yourname