Git log to show commits either by author OR commit message
I would like to use git log (open to other suggestions) to list all commits that either
- Were done by a specific author
- 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?
See also questions close to this topic
How to fix "Unable to unlink old *: No such file or directory"?
I have cloned a branch from a remote repository:
git clone -b feature/feature1 http://..... git status On branch feature/feature1 Your branch is up to date with 'origin/feature/feature1' nothing to commit, working tree is clean
Now I am trying to use
git rebase -ito squash the two last commits:
git rebase -i HEAD~3 pick ... pick .... squash ...
However, I'm getting this error:
error: unable to unlink old 'file1': No such file or directory error: unable to unlink old 'file2': No such file or directory error: unable to unlink old 'file3': No such file or directory hint: Could not execute the todo command hint: hint: squash 3b6cabf2541e333d614c3cd5dbbb82a37037cc14 some commit hint: hint: It has been rescheduled; To edit the command before continuing, please hint: edit the todo list first: hint: hint: git rebase --edit-todo hint: git rebase --continue Could not apply 3b6cabf... some commit
Why do I get this error and how can I fix it?
Commit a single file in Visual Studio Professional 2017
I'm working with an application that is stored on Github. I'd like to commit a single file. It seems like this would be trivial but I don't see how it's done.
If I right click on the file I want to commit and select the Commit command, it seems to show that all modified files will be checked in. There is a Commit All button/dropdown that becomes enabled when I start entering a commit message. But the dropdown has no option to commit less than everything.
Surely this is supported.
How to sync code between AWS CodeCommit and GitLab?
The upstream is AWS Codecommit. So whenever code is pushed I want to pull it and then push it to a GitLab repository. Currently I'm doing this using a
cronjobon a local machine which needs to be available all the time. Can this be accomplished in any other way?
Filter git log by author or branch
In my workflow I'm usually only interested in my own branches and some specific branches like
masterand would like my
git logto reflect that. I've come up with this command :
git log --branches=staging* --author=my_name
The problem is that the
branchesfilters seem to linked with the logical operator
and, meaning that I can either see all my branches or staging, but not both at the same time.
In other words, I'd like to see only commits where I'm the author AND all the commits of the branch named
stagingbranch (regardless of the authors), with one single command.
Is there a way to achieve this ?
Is there a way to show the git log graph from the HEAD to a commit that was made by a specific user?
We have our daily build done by a automated user, which will make an empty commit to the repo with the build information in the message.
I was wondering if I could either:
- Get the last log entry (or n log entries) from where I am currently in the repo that was committed by that automated user and/or
- Show a graph from HEAD to that same automated user's commit which shows all users commits that were done in between.
Are either possible just using git commands, or do I have to do some external processing?
Git - history of a file
I have a workflow pattern that crops up quite often and I wondered how to achieve this in git.
I have a file which has changed over time. I may have deleted a method or changed it in some way but I now realise some of the code could be useful.
How do I check the history of individual files and checkout and compare this previously committed file?