Git: work flow of how a feature added to a branch
A workflow of how to add a feature in remote repository Git: work flow of how a feature added to a branchPULL REMOTE TO LOCALNEW FEATURE BRANCH FROM LOCALEDIT YOUR FEATURE BRANCH (ADD, COMMIT)LOCAL PU
A workflow of how to add a feature in remote repository
Here is a summary of the commands and method I use to make a change in Git with minimal interference to the main branch. This is an old article I posted on another platform, and I’m sharing it with everyone here.
這是我認為git以最低程度干擾主幹的情況下進行一項改動的操作方式與指令整理,是本人在別的平台上的舊文章,分享給大家。
Git: work flow of how a feature added to a branch
full graph
PULL REMOTE TO LOCAL
NEW FEATURE BRANCH FROM LOCAL
EDIT YOUR FEATURE BRANCH (ADD, COMMIT)
LOCAL PULL REMOTE
FEATURE MERGE TO LOCAL, ALSO FIX CONFLICT
LOCAL SQUASH MERGE TO ONE COMMIT
PUSH COMMIT TO REMOTE
Note
-
Difference between fetch and pull
-
ow to check commit history
git log --oneline
- how to check commit history
git reset HEAD~<numberOfCommit>
- change last git commit message
git commit --amend -m "reset message
>second line
>third line
"
Reference
https://backlog.com/git-tutorial/tw/stepup/stepup3_1.html
gitbook
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)