git-reference | git 手册 | Version Control System library
kandi X-RAY | git-reference Summary
kandi X-RAY | git-reference Summary
git-reference
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git-reference
git-reference Key Features
git-reference Examples and Code Snippets
Community Discussions
Trending Discussions on git-reference
QUESTION
If I compare the git/refs when creating a new branch from last commit of a branch versus creating from a detached head state, the git/refs shows different behavior (names) and I like to understand why.
Lets assume the head is on master.
I need a new dev branch. After that, I made some commits to the new branch and some fixes on master.
Now I see another way how to solve the dev branch and I made a second new branch and some commits on that and on master again some fixes.
But now the refs look different! As long as I don't merge plus delete or only delete the second branch still the first two refs called after that second branch.
Why is this a good behavior, cause I cannot easily see that the first refs usually belong to master? Only hashes and parent hashes help with identification, but are a slow method. THX.
EDIT: The information shown here is provided from git log
command.
ANSWER
Answered 2020-Jul-13 at 08:04Unlike other version control systems you may be familiar with, commits don't belong to any branch. Instead, a branch is just a label that points to a commit. There's no definitive answer to the question "which branch does a commit belong to" or "which branch was a commit written on". Instead, you can only say what commits are reachable by a branch. And that's just what %S
does. It works just like --source
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-reference
You can use git-reference like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page