Git Commands

  1. echo -e "First line.\nSecond line." >> file_name.txt is a shortcut of two commands.
  2. git add . puts all files into “Index”.
  3. master is a reference to the end of a branch. By convention (and by default) this is usually the main integration branch, but it doesn’t have to be. HEAD is actually a special type of reference that points to another reference. It may point to master or it may not (it will point to whichever branch is currently checked out).
  4. On your own repository you can check where the HEAD is pointing to by running git symbolic-ref HEAD.
  5. git reset --hard HEAD^3 deletes your cache and returns to the third parent commit.
  6. git checkout -b dev = git branch dev + git checkout dec .
  7. git branch displays current branch.
  8. Suppose you’ve decided that your issue #53 work is complete and ready to be merged into your master branch. In order to do that, you’ll merge your iss53 branch into master. All you have to do is check out the branch you wish to merge into and then run the git merge command: git checkout master -> git merge iss53 -> git branch -d iss53.
  9. git push origin HEAD:refs/for/master is used for code review.
  10. git ls-remote show all remote branches.

注:本篇博客的内容十分傻逼,我有空一定会写一个更好的版本,不过现在是真的没空啊。 ——JHW奇迹之瞳于1/23/2021

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值