Skip to content

Instantly share code, notes, and snippets.

@jayzhan211
Created June 22, 2018 13:35
Show Gist options
  • Save jayzhan211/5b3cdd27678dc19d9b5900d7a5890184 to your computer and use it in GitHub Desktop.
Save jayzhan211/5b3cdd27678dc19d9b5900d7a5890184 to your computer and use it in GitHub Desktop.
git 指令:
本機端初始化:
git config --global user.name "[username]"
git config --global user.email "[email]"
cd 到 本機要放此repo 的資料夾path
github上複製URL
git clone https://github.com/username/test.git
cd到repo
git branch v1(branch name)
git checkout v1
新增/修改 檔案 (可以直接在本機資料夾處理)
一些指令:
git diff
修改後:
git add -A
Remove:
git rm <file>
Move:
git mv <file> <directory>
Rename:
git mv <file> <new_name>
git status 查看
沒紅色名子代表OK
git commit
加入修改訊息
git checkout master (回到master)
git merge v1 (合併)
git push
打完帳密結束
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment