Replies: 2 comments 3 replies
-
That's a good idea! Unfortunately, I don't have time to work on the documentation right now, but I would be happy to accept or review documentation towards this end if anyone else wanted to write it. |
Beta Was this translation helpful? Give feedback.
-
Hello? The purpose of this document focuses on how to maintain a linear branch(branchless) using the command of Tutorial. If you like it, I hope it will be added to the wiki. Learn step by stepInitFirst, we will initialize and create a general branch.
git init --initial-branch=main
git branchless init --main-branch=main
touch commit0
git add commit0
git commit -m "Add: commit0"
touch commit1
git add commit1
git commit -m "Add: commit1"
touch commit2
git add commit2
git commit -m "Add: commit2"
git switch -c featA
touch commit3
git add commit3
git commit -m "Add: commit3"
touch commit4
git add commit4
git commit -m "Add: commit4"
git switch main As you can see from the log, it runs through Let's check the created commits by git log --graph --oneline --all --decorate --color --topo-order --branches -10 | tac Let's also check with git sl Basic to useYou will now create an anonymous branch. touch commit5
git add commit5
git commit -m "Add: commit5"
git switch --detach # Start anonymous branch
touch commit6
git add commit6
git commit -m "Add: commit6" Now let's say you want to go back to
On the contrary, you can use git next
git prev 3 Moving commitsNow, the Using git next 2 -o # Go to the old commit direction, The new commit direction is `-n`
git sync What if you regret after doing this? git undo Here comes one more advantage of This time, let's move git move -s 7de4f31 -d d4b489a After git undo
git move -b featA -d 7de4f31 Keeping it branchlessWith git-branchless, it is this easy to keep the commit graph without branch. git rebase -i HEAD~2 A branch has been created because a new commit is created. git restack
Now enjoy a simpler and smarter commit graph, a fearless git commands and commits. There is also a stronger and more intuitive revset than revision, so check if you need a selector. |
Beta Was this translation helpful? Give feedback.
-
First of all, thank you for making a great tool.
In my opinion, if there is a additional tutorial for the onboarding of new users, it will be helpful.
The current Tutorial documentation explain key features well. 👍
However, users who are familiar with stock git branch strategies seem to have difficulty switching or applying them right away. #402
I think it would be nice to explain the way that comes from a relatively universal
git flow
orgithub flow
in the following way:Beta Was this translation helpful? Give feedback.
All reactions