重要的 Git 命令和教程

如何取得 Git 指令的協助

git 幫助 [-a|–all|-i|–info|-m|–man|-w|–web] [COMMAND]

範例:git 幫助 git

它會啟動瀏覽器並顯示 HTML 格式的幫助。

設定本機儲存庫並進行初始推送:

cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master

簽出儲存庫

git clone git://github.com/schacon/grit.git

要將變更提交到本機儲存庫,只需新增即可,而不是提交。如果您想將本機分支/變更推送到遠端儲存庫,只需執行下面的推送命令。

git add --all

git commit --all

git push

推送到儲存庫命令

git push <remote> <local branch name>:<remote branch to push into>
git push [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=]
           [--repo=] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
           [--force-with-lease[=[:]]]
           [--no-verify] [ […]]

更多命令可在以下連結中找到。

包含 20 個命令的日常 Git

https://www.kernel.org/pub/software/scm/git/docs/everyday.html

好的 Git 教學

教學1先製作-http://git-scm.com/docs/gittutorial

教學2秒製作 – http://git-scm.com/docs/gittutorial-2.html

進一步教學 – http://www.vogella.com/tutorials/Git/article.html#firstgit_repostatus

2条回应“重要的Git命令和教程”

  1. 我想感谢您的精彩阅读!
    我绝对喜欢它的每一点。我有
    您添加书签以查看您发布的新内容...

  2. 哇,这一段​​好舒服,我的小弟
    姐姐正在分析这些事情,
    因此我要通知她。

发表回复