Git and Github Notes

129 阅读1分钟

git构建工作流-- 常见命令

1 git init -- 初始化

2 git add

将文件添加到暂存区

git add . 

3 git status -s

查看git状态

git status -s 

4 git log --online

打印日志

5 git push -u origin

推送到远程仓库

6 git checkout -b branchname

切换并创建下一个分支

7 git branch

查看当前所有分支以及所处分支

8 git checkout master

切换到主分支

9 git merge branchname

将 某分支 合并到 master

10 git push -- 将合并后的master 推送到远程

11 git branch -d branchname 删除本地分支

10 git reset --hard 版本号

慎用