git-log

Show all branches merged to Master between 2 dates - Git

与世无争的帅哥 提交于 2021-02-11 14:13:58
问题 With git log I can use --since and --until to show data between 2 dates. And with git branch -r I can extract all the remote branches. How would I show all branches merged to master between 2 dates? git log --since "DEC 1 2019" --until "JAN 1 2020" --pretty=format:"%h %an %ad" This returns all commits between 2 dates but I'd like to return the branch names between these 2 dates that were merged to master? Thanks in advance. 回答1: You can try with the --merges and the --date flags for git log .

How to show the change itself using git log pickaxe?

為{幸葍}努か 提交于 2021-02-10 12:53:51
问题 I would like to search git log for a specific string to find where it was modified/deleted/added. I knew that I can do this using pickaxe (i.e., git log -S"Text" ) When I run this command, only the names of the commits where the change has occurred are shown. I also tried git log -G"Text" but no difference. When I tried git log -p -S"Text" , it showed me full comparision between two versions of files. Is there a way to spot the exact location (line) where the text has been changed/added

Extra newline in git log with tformat

懵懂的女人 提交于 2021-02-07 14:18:22
问题 When I use git log --pretty=oneline --shortstat , I get a compact representation of my log: % git log --pretty=oneline --shortstat 73c6eecd930c2f66d5c1e87fcca7ca9b0e356809 doing stuff with things 3 files changed, 134 insertions(+) 65b457d2e0e94e628e1b30204075540524c8a1d2 doing things with stuff 2 files changed, 4 insertions(+), 1 deletion(-) ... 375531279297af3c787855b0848b400f1c40b638 things with stuff doing 1 file changed, 2 insertions(+) 5501964b19815a07b64e1cd391e032147af33b8f with things

git log filter with sparse checkout

拜拜、爱过 提交于 2021-01-29 12:27:57
问题 I have a large project that I use sparse checkout to exclude one directory (which is quite large). However, when I use git log, the commit in the directory that I already excluded with sparse checkout will show up, polluting my real interests. The answer given for this question by specifying one directory doesn't work for me since I need to exclude one directory but include many. I came from perforce where if I specify ... , it will not include files or directories that were excluded by my p4

avoid auto merging of git conflicts and warn if same files getting modified in different branches

扶醉桌前 提交于 2021-01-29 09:12:16
问题 Usually when we merge feature branch with master or any other branch and if same file is modified in different branches but on different lines then GIT does resolve the conflict automatically. We dont want these merge happened automatically and expecting GIT should warn us with list of common files modified in two branches to be merged. e.g. In Master, we have file test1.txt as below AAA BBB Feature branch (feature/test1) created out of master and updated file test1.txt AAA BBB CCC also added

Why Gitkraken does not display any logs in big repos?

老子叫甜甜 提交于 2021-01-29 08:57:13
问题 I have a quite big repo with exactly 26731 commits, the GitKraken does not show any logs for this repo. It works fine on other repos but not in this repo , although it recognizes the branches and tags but it does not display any logs in any branch (as the below image). Things I have tried but didn't work: Adjust the preference to display all logs. Remove the ~/.gitkraken folder (to clear any destructive caches if any exists). Uninstall/Install the GitKraken with the latest version.

Preserve Git history of file after deleting and recreating in another folder

一个人想着一个人 提交于 2021-01-27 20:32:34
问题 I've the following scenario: Deleted a file called src/GetData.cs in commit 1. Created a file called src/Get/GetDataNew.cs in commit 5. Renamed file in 2 to src/Get/GetData.cs in commit 7. The files in 1 and 3 are pretty much the same with minor changes but due to several iterations, I ended up creating an entirely new file and deleting the old one. Is there any way to preserve/move git history of file 1 in file 3? One approach that I can think of is reverting back to the commit where I

Git log to show commits either by author OR commit message

那年仲夏 提交于 2021-01-27 14:40:30
问题 I would like to use git log (open to other suggestions) to list all commits that either Were done by a specific author or Which have a specific word in their commit message I know how to search for each separately, but I would like a single list containing all matching commits. What is the easiest way to achieve this? 回答1: You can use git rev-list to generate the hash IDs that git log should show, and then use git log --no-walk --stdin to read those IDs, sort them according to the usual git

HEAD~4^2 meaning

好久不见. 提交于 2021-01-18 04:13:15
问题 In a Udacity lesson covering relative commit references, it says: ^ indicates the parent commit, ~ indicates the first parent commit The main difference between the ^ and the ~ is when a commit is created from a merge. A merge commit has two parents. With a merge commit, the ^ reference is used to indicate the first parent of the commit while ^2 indicates the second parent. The first parent is the branch you were on when you ran git merge while the second parent is the branch that was merged

HEAD~4^2 meaning

a 夏天 提交于 2021-01-18 04:01:06
问题 In a Udacity lesson covering relative commit references, it says: ^ indicates the parent commit, ~ indicates the first parent commit The main difference between the ^ and the ~ is when a commit is created from a merge. A merge commit has two parents. With a merge commit, the ^ reference is used to indicate the first parent of the commit while ^2 indicates the second parent. The first parent is the branch you were on when you ran git merge while the second parent is the branch that was merged