Skip to content

Instantly share code, notes, and snippets.

@junex
Last active September 26, 2019 06:55
Show Gist options
  • Save junex/5fa47cd7de884903e2490a9f88f9c331 to your computer and use it in GitHub Desktop.
Save junex/5fa47cd7de884903e2490a9f88f9c331 to your computer and use it in GitHub Desktop.
一些git命令
#新建库并推送到远端
git remote add origin [email protected]:junex/heartdrop.git #添加远端
git push -u origin master #推到远端
#其他
git branch -a #查看所有分支
git branch -b dev orignal/dev #迁出远端dev并跟踪
git checkout . #还原当前的更改
git clean -xdf #删除未跟踪的文件,不加x,则忽略.gitignore的文件
git stash #贮藏更改
git stash list
git stash clear
git stash drop stash@{0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment