码迷,mamicode.com
首页 > 其他好文 > 详细

git 常用命令

时间:2020-06-30 16:03:38      阅读:57      评论:0      收藏:0      [点我收藏+]

标签:ges   tor   needed   als   etc   bsp   car   find   for   

  • git config --list
    •   List all the settings git can find at /etc/gitconfig, ~/.gitconfig, ~/.config/git/config or .git/config.
  • git config --system --list
    • List the settings git can find at /etc/gitconfig.git config --global --list List the settings git can find at ~/.gitconfig or ~/.config/git/config.
  • git config --local
    •   --list List the settings git can find at .git/config.

 

  • git config --global http.sslverify false
    •   Set git value for current user.
  • git config --global user.name "Firstname Lastname"
    •   Set git value for current user.
  • git config --global user.email email@email.com
    •   Set git value for current user.
  • git clone git@github.com:xlhu/xxx.git
  • git checkout .
    •   Discard all changes
  • git push origin --delete hux10-ut-refactor2
    •   Delete remote branch
  • git branch -D branch
    •   Delete local branch
  • git push origin hux10-ut-refactor2
    •   Push local branch to remote
  • git checkout feature/ECDM-60686-rs-scope-out-changes-needed-to-remove-our-dependency-on-yavijava
  • git pull origin master
    •   从 master branch pull 改动到当前 branch
  • git reset --soft HEAD^
    •   Withdraw the commit and keep the changes

 

git 常用命令

标签:ges   tor   needed   als   etc   bsp   car   find   for   

原文地址:https://www.cnblogs.com/weiweifeng/p/13214233.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!