The 1st week summary of devtools community in learnku.com

The posted content in the first week of moderator development of devtools community in learnku.com is summarized as follows:

How to edit, delete existing commits in Git

  • Fix premature commits that often occur during normal development

$ git rebase -i <commit's ID before the premature commit>

# Then you can do whatever you want
  • Drop a commit

$ git rebase -i <commit's ID before the will-be-dropped commit>

Some notes about remote repo in Git

Some notes about centralized workflow in Git

The git-rebase, fast-forward elaboration from man is worth reading.

Git articles reading notes 1

  • How to undo the last commit?

  • How to change the last commit?

Git articles reading notes 2

  • What’s inside a commit?

  • What happened in a commit?

  • Branches, tags and HEAD are nothing more than a pointer to a commit.

Note: This article is not very clear and may be rewritten later.

less command summary (copied directly from cmd)

[原创] How to revise author name and email in commit history

As far as I know, there are three ways to achieve this purpose.

method pros cons
git-rebase easy,safe not very fit for revising a bunch of commits
git-filter-branch fit for batch operation very dangerous, usage is not easy
git-filter-repo recommended officially, fit for batch ops not out of the box in Git, need install it

How to add sub-repo as sub-module

Using git-submodule

[原创] How to show chinese character in Git Status

$ git config --global core.quotePath false

[原创] How to pull code when shared repo commit history has been changed

$ git pull --rebase, but keep in mind that change to shared repo commit history is very dangerous!

Some notes about distributed workflows in Git

In short, the distributed workflows is a few personal development processes + a few more remote repositories.

本作品采用《CC 协议》,转载必须注明作者和本文链接
日拱一卒
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
未填写
文章
88
粉丝
82
喜欢
148
收藏
120
排名:66
访问:11.4 万
私信
所有博文
社区赞助商