What is git margin commit

The git log command has the --boundary parameter, which forces the program

Excluded boundary commits.

But what is border fixation? And when can I include them in the output?

+8
git
source share
2 answers

Boundary commit is a commit that limits the range of revisions, but does not belong to this range. For example, the revision range is HEAD~3..HEAD consists of 3 commits ( HEAD~2 , HEAD~1 and HEAD ), and commit HEAD~3 serves to fix the boundaries for it.

More formally, git handles a range of revisions, starting from the specified commit and retrieving through other parent commit links. He dwells on fixations that do not meet the selection criteria (and therefore should be excluded) - these are boundary obligations.

Illustration:

 $ mkdir test $ cd test $ git init Initialized empty Git repository in ~/playground/git/test/.git/ $ touch a $ git add a $ for i in {1..5}; do echo $i >> a; git commit -m "Commit #$i" a; done [master (root-commit) bf958f1] Commit #1 1 file changed, 1 insertion(+) create mode 100644 a [master 3721a8b] Commit #2 1 file changed, 1 insertion(+) [master d69efcc] Commit #3 1 file changed, 1 insertion(+) [master 72cd21d] Commit #4 1 file changed, 1 insertion(+) [master 17ae9c3] Commit #5 1 file changed, 1 insertion(+) $ git log --oneline 17ae9c3 Commit #5 72cd21d Commit #4 d69efcc Commit #3 3721a8b Commit #2 bf958f1 Commit #1 $ git log --oneline HEAD~3.. 17ae9c3 Commit #5 72cd21d Commit #4 d69efcc Commit #3 $ git log --oneline HEAD~3.. --boundary 17ae9c3 Commit #5 72cd21d Commit #4 d69efcc Commit #3 - 3721a8b Commit #2 <-- This is the boundary commit HEAD~3 that would not be included in the output had the '--boundary' option NOT been provided 
+4
source share

--boundary

--boundary argument should show the commit context (parent revision).

A boundary commit is a commit that does not fall into the "frame" on which the command is executed. (-since, fix range, etc.)

For example, if you use a parameter of type –since=3.weeks , –since=3.weeks up to three weeks is considered boundary commits . Usually boundary commits are marked -

enter image description here

In the above snapshot, you can see that the last commit has “left” in the second journal. This is due to the --boundary flag

You can see that there is an o sign before the commit, and not * , as in regular commits.

-one
source share

All Articles