git-log

Git says branch is merged, but changes are apparently not present

别说谁变了你拦得住时间么 提交于 2020-05-10 09:06:52
问题 I've worked myself into a situation that is not making sense to me. I'll try to describe it as best I can. I have a development branch and I've merged master into it via git checkout develpment && git merge master . I didn't get any merge conflicts here. There is a specific commit that I'm interested in, let's say it's abcd123 . When I run git branch --contains abcd123 , it reports that both development and master contain abcd123 . When I do git log , it shows abcd123 in the list of commits,

Difference in the output of git log --decorate: (HEAD -> master) vs (HEAD, master)

夙愿已清 提交于 2020-05-07 18:59:28
问题 When I get the log of a GIT repo: git log --oneline --decorate --graph the output is like this: * 44025ed (HEAD -> master) second commit * adf2dbb first commmit In another repo, when I git log , I get: * 435b61d (HEAD,master) bar * 9773e52 foo What is the difference between (HEAD -> master) and (HEAD,master) 回答1: The arrow points to the current branch An arrow to the right of HEAD , in the output of git log --oneline --decorate --graph , indicates which branch (if any) is the current one. *

How do I get the last merge from develop into master in Git?

谁都会走 提交于 2020-02-28 12:33:31
问题 In order to automate my CI, I need to get the info of the last merge executed from the develop branch into the master branch (or more generically, from a given source branch to a given destination branch). I tried with git log --oneline --merges master -20 but this get me a list of all the last 20 merges into master , without differentiating by source branch (leaving me with the cumbersome task to parse and infer the source branch from the comment). Is there a clean and robust way to filter

How to make git-log scroll up instead of down

牧云@^-^@ 提交于 2020-01-29 14:30:27
问题 Whenever I view a git log --all --graph --oneline --decorate output in my terminal emulator, the first commit is viewed at the top of the terminal screen. When I quit the git log output view with q , a few lines from the are not visible any more, as there are some new lines appended to the bottom of the screen, for the next command. Usually though, those top lines are the most interesting, as they resemble the most recent git history, so I want them to be still visible when I type the next

How to make git-log scroll up instead of down

非 Y 不嫁゛ 提交于 2020-01-29 14:28:27
问题 Whenever I view a git log --all --graph --oneline --decorate output in my terminal emulator, the first commit is viewed at the top of the terminal screen. When I quit the git log output view with q , a few lines from the are not visible any more, as there are some new lines appended to the bottom of the screen, for the next command. Usually though, those top lines are the most interesting, as they resemble the most recent git history, so I want them to be still visible when I type the next

What does git log --since/--until do when there is no HH:MM:SS supplied in the value?

可紊 提交于 2020-01-25 01:03:25
问题 Reference the answer at https://stackoverflow.com/a/19987337/257924 to the question of How do I view all commits for a specific day? What is the value of HH:MM:SS referenced below that would make the output of the following command be true across all git repositories regardless of history and content: git log --since='2019-12-25' --until='2019-12-26 00:00:00' git log --since='2019-12-25 HH:MM:SS' --until='2019-12-26 00:00:00' I ask because the man-page for git-log does not provide that detail

View git log without merge commits

青春壹個敷衍的年華 提交于 2020-01-22 05:33:06
问题 I'm trying to view commits made by a specific user, and want to remove any merges done by the user from the output. How can I do so? I can check for the commits of a user using git log --author=<name> , but can't remove the merge commits in the output. PS: Merge conflicts do not happen in the workflow of the repo in question, all branches are rebased before merging into master so it is safe to remove the merge commits from the output, and similarly, two feature branches are not merged with

How to reproduce the format of git log --oneline --decorate?

我只是一个虾纸丫 提交于 2020-01-14 14:22:13
问题 Where is the format of git log --oneline --decorate defined? Using git Iog --format=format:'my format', I cannot reproduce the colours of the branches, tags and HEAD as shown by git log --oneline --decorate. git log --oneline --decorate shows HEAD in light blue, the branch names in green and the punctuations (,,) in brown. The closest I have come to getting what I want is: git log --graph --abbrev-commit --decorate --date=short --format=format:'%C(bold blue)%h%C(reset) %C(bold green)%ad%C

How to get git-log to display commits using relative revision syntax of git-parse-rev

末鹿安然 提交于 2020-01-05 07:37:00
问题 git show-branch displays commits using the relative revision expressions that can be parsed by git-parse-rev, for example "dev~106^2~52". How can I get the same output from git-log? 回答1: No. The documentation for git log ( git help log ) describes ways to customize the output using --pretty=tformat:... , but unfortunately there is no placeholder for git describe -style revision identifiers, nor is there a placeholder to run a shell command and use its output. Either would make it possible to

“git log -1 fullpath/myfile” with libgit2

橙三吉。 提交于 2020-01-02 23:44:12
问题 I want to implement git log -1 fullpath/myfile with libgit2. I am fairly new to libgit2. Am I on the right track? This is what I have so far: git_repository_head(&refToHead, repo); headOID = git_reference_oid(refToHead); git_commit_lookup(&headCommit, repo, headOID); headTreeOID = git_commit_tree_oid(headCommit); git_tree_lookup(&tree, repo, headTreeOID); git_tree_entry_byname(tree, "repopath/myfile"); Unfortunately git_tree_entry_byname seems not to work for files in subdirectories of the