這篇文章主要為大家展示了“Git的常用操作命令有哪些”,內容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領大家一起研究并學習一下“Git的常用操作命令有哪些”這篇文章吧。
成都創新互聯公司服務項目包括云城網站建設、云城網站制作、云城網頁制作以及云城網絡營銷策劃等。多年來,我們專注于互聯網行業,利用自身積累的技術優勢、行業經驗、深度合作伙伴關系等,向廣大中小型企業、政府機構等提供互聯網行業的解決方案,云城網站推廣取得了明顯的社會效益與經濟效益。目前,我們服務的客戶以成都為中心已經輻射到云城省份的部分城市,未來相信會繼續擴大服務區域并繼續獲得客戶的支持與信任!
git init
git init [project-name]
git clone [url]
Git的設置文件為.gitconfig,它可以在用戶主目錄下(全局配置),也可以在項目目錄下(項目配置)。
git config --list
git config -e [--global]
git config [--global] user.name "[name]"git config [--global] user.email "[email address]"
git add [file1] [file2] ...
git add [dir]
git add .
git add -p
git rm [file1] [file2] ...
git rm --cached [file]
git mv [file-original] [file-renamed]
git commit -m [message]
git commit [file1] [file2] ... -m [message]
git commit -a
git commit -v
git commit --amend -m [message]
git commit --amend [file1] [file2] ...
git branch
git branch -r
git branch -a
git branch [branch-name]
git checkout -b [branch]
git branch [branch] [commit]
git branch --track [branch] [remote-branch]
git checkout [branch-name]
git checkout -
git branch --set-upstream [branch] [remote-branch]
git merge [branch]
git cherry-pick [commit]
git branch -d [branch-name]
git push origin --delete [branch-name]git branch -dr [remote/branch]
git tag
git tag [tag]
git tag [tag] [commit]
git tag -d [tag]
git push origin :refs/tags/[tagName]
git show [tag]
git push [remote] [tag]
git push [remote] --tags
git checkout -b [branch] [tag]
git status
git log
git log --stat
git log -S [keyword]
git log [tag] HEAD --pretty=format:%s
git log [tag] HEAD --grep feature
git log --follow [file]git whatchanged [file]
git log -p [file]
git log -5 --pretty --oneline
git shortlog -sn
git blame [file]
git diff
git diff --cached [file]
git diff HEAD
git diff [first-branch]...[second-branch]
git diff --shortstat "@{0 day ago}"
git show [commit]
git show --name-only [commit]
git show [commit]:[filename]
git reflog
git fetch [remote]
git remote -v
git remote show [remote]
git remote add [shortname] [url]
git pull [remote] [branch]
git push [remote] [branch]
git push [remote] --force
git push [remote] --all
git checkout [file]
git checkout [commit] [file]
git checkout .
git reset [file]
git reset --hard
git reset [commit]
git reset --hard [commit]
git reset --keep [commit]
git revert [commit]
git stash git stash pop
git archive
以上是“Git的常用操作命令有哪些”這篇文章的所有內容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內容對大家有所幫助,如果還想學習更多知識,歡迎關注創新互聯行業資訊頻道!
網頁名稱:Git的常用操作命令有哪些
鏈接地址:http://m.kartarina.com/article0/pphdio.html
成都網站建設公司_創新互聯,為您提供ChatGPT、響應式網站、外貿網站建設、自適應網站、網頁設計公司、網站排名
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯