我就不信了git这个东西 还能难到我。
来源:互联网 发布:linux怎么安装软件.tgz 编辑:程序博客网 时间:2024/06/02 16:54
git-init 初始化一个repository
git-add . "." 表示全部
刚刚新建立的只有master一个branch 并且在没有commit之前不能建立新的branch
git-branch branchname 新建立一个branchname
git-branch 显示现有branch
git-branch -d branchname 删除branchname 但是分之内容的改动还是保留的,-D 就完全删除一个分支了
git-checkout branchname 转到这个branchname
git-merge branchname 把branchname 的分支和当前的分支合并。
git-diff 显示不同(commit之前)git-log查看当前的记录 git-status查看当前的状态
在使用git-commit -a 的时候加入comment的时候 第一行加入不多余50字的summary 然后空一行,然后写详细的内容
gitk 是一个好用的图形化工具。
要用本地分支向远程分支push 不能跨分枝
删除远程分支以后本地还是留有远程的副本可以使用git-branch -rd branch name 删除
在新clone下来的东西默认是在本地的master分支 ,如果要是想要向远程的非master分支push东西,就是使用全的命令行 :
git-push orgin master:otherbranchname
git checkout -b ebipr --track origin/keyboard
git-add . "." 表示全部
刚刚新建立的只有master一个branch 并且在没有commit之前不能建立新的branch
git-branch branchname 新建立一个branchname
git-branch 显示现有branch
git-branch -d branchname 删除branchname 但是分之内容的改动还是保留的,-D 就完全删除一个分支了
git-checkout branchname 转到这个branchname
git-merge branchname 把branchname 的分支和当前的分支合并。
git-diff 显示不同(commit之前)git-log查看当前的记录 git-status查看当前的状态
在使用git-commit -a 的时候加入comment的时候 第一行加入不多余50字的summary 然后空一行,然后写详细的内容
gitk 是一个好用的图形化工具。
git pull /home/bob/myrepo master删除 远程分支 git-push origin : branchname
This merges the changes from Bob's "master" branch into Alice's current This merges the changes from Bob's "master" branch into Alice's current
branch. If Alice has made her own changes in the meantime, then she may need to
manually fix any conflicts. (Note that the "master" argument in the above command is actually unnecessary, as it is the default.)
branch
pull = fetch + merge
在决定向服务器push代码的时候向master分枝,要保证本地的master是要上传的代码,这样才可以。我一般都是先把自己的远端的分枝push然后再push远端的master
要用本地分支向远程分支push 不能跨分枝
删除远程分支以后本地还是留有远程的副本可以使用git-branch -rd branch name 删除
在新clone下来的东西默认是在本地的master分支 ,如果要是想要向远程的非master分支push东西,就是使用全的命令行 :
git-push orgin master:otherbranchname
git checkout -b ebipr --track origin/keyboard
- 我就不信了git这个东西 还能难到我。
- 补码原理,我就不信了。
- 不信我就过不去!
- 我就不信你这样用过
- 明天就到好福州看看,人家说不错的,我就不信了~士大夫
- 每次连接阿里云服务器浪费半小时,我就不信了。
- 我恨钱这个东西
- 一直说我胖了,我还不信。
- 撕心裂肺的爱情(我就不信你不哭)
- FOJ 1723 我就不信你能找得到
- FZU 1723 我就不信你能找得到
- 我不信啊啊
- 我就不明白了
- “我就秀了!”
- SVN、GIT日常看我就够了
- 至于你信不信,反正我信了
- 不管你信不信,反正我信了
- 不管你们信不信,反正我信了
- 如果是遇到VMWARE 6(SERVER)出现2GB FILE REASONS TOO BIG
- Linux线程实现机制分析
- 标准 C I/O 之 fgetpos () 函数
- 无题
- Past and Future of Information Systems
- 我就不信了git这个东西 还能难到我。
- Understanding Tcp/ip: A Clear And Comprehensive Guide
- mysql的一些命令(初学)
- strtol
- Ruby Cookbook
- 测试nand flash
- java web目录树
- Hardening Linux
- Information Technology Security: Advice from Experts