https://github.com/xiaokyo/git-study
learn git commands
https://github.com/xiaokyo/git-study
Last synced: 5 months ago
JSON representation
learn git commands
- Host: GitHub
- URL: https://github.com/xiaokyo/git-study
- Owner: xiaokyo
- Created: 2019-03-25T03:17:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T02:45:30.000Z (about 6 years ago)
- Last Synced: 2025-06-08T03:26:56.062Z (7 months ago)
- Language: JavaScript
- Size: 309 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# learn git commands
git commit -m "frist commit"
忘记添加文件index.js,你可以执行下面的命令
git add index.js
git commit --amend // 修改最后一条commit信息
获取master分支最新的commit和本地的仓库进行合并
git pull origin master
设置新的远程仓库url
git remote set-url origin
指定分支上传拉取 不用每次指定操作的分支
git branch --set-upstream-to=origin/test test
回退版本强制提交
git reset --hard e377f60e28c8b84158
git push -f origin dev
获取单次提交的commit修改
git log --online -3
git cherry-pick 2555c6e
// 有冲突解决后
git cherry-pick --continue
// or
git cherry-pick 2555c6e -n
// 不自动提交
修改本地分支名称
git branch -m
# git tree
