Git

Date Tags Git

可视化Learn Git Branching

1. 仓库管理

Create Repository

$ mkdir myrepo

$ cd myrepo

$ git init

Initialized empty Git repository in /Users/jerrylsu/myrepo/.git/

Add File to Local Repository

$ git status

$ git diff filename

Check working directory status, and view changes made to the filemname.

$ git …

more ...

Keeping a fork synced with the origin repo

Date Tags Git
1. fork upstream_repo_url
2. git clone origin_repo_url
3. git remote add upstream upstream_url
4. git remote -v
5. git pull upstream dev
   - git fetch upstream
   - git checkout dev
   - git merge upstream/dev
6. git checkout -b dev_01
   (modify code...)
7. git push …
more ...