How can I Git ignore subfolders / subdirectories?
Use wildcards: Solution/*/bin/Debug Solution/*/bin/Release With version 1.8.2 of Git, you can also use the ** wildcard to match any level of subdirectories: **/bin/Debug/ **/bin/Release/
Use wildcards: Solution/*/bin/Debug Solution/*/bin/Release With version 1.8.2 of Git, you can also use the ** wildcard to match any level of subdirectories: **/bin/Debug/ **/bin/Release/
If you want to find all commits where the commit message contains a given word, use $ git log –grep=word If you want to find all commits where “word” was added or removed in the file contents (to be more exact: where the number of occurrences of “word” changed), i.e., search the commit contents, use … Read more
Read e.g. this explanation http://git-scm.com/book/en/Git-Branching-Remote-Branches First let’s clarify some git terminology: fetch: getting contents (or updates) from a remote repo pull: fetch (as above) and merge in one step The original poster did not mention merging, so I might guess in proper git terminology he might even have wanted to ask “git fetch all branches … Read more
From the git grep manual: Options: -n, –line-number Prefix the line number to matching lines. Configuration: grep.lineNumber If set to true, enable -n option by default. To turn on globally: git config –global grep.lineNumber true
git doesn’t ignore files that have been added to the repository. If you want to get it ignored, you have to delete the file from the repository: git rm –cached project1.suo git commit -m “Delete suo file from repository” This will delete the file from the repository, while it’s still on your harddrive.
git log -10 Would show 10 latest commits matching the revision spec (a missing spec means “all commits”). See manpage: git help log section Commit Limiting -<number>, -n <number>, –max-count=<number> Limit the number of commits to output.
I have presented git restore (which is still marked as “experimental”) in “How to reset all files from working directory but not from staging area?”, with the recent Git 2.23 (August 2019). It helps separate git checkout into two commands: one for files (git restore), which can cover git reset cases. one for branches (git … Read more
As pointed out in the comments and in Jackub’s answer, as long as your branch is younger than the number of days set in the config setting gc.reflogexpire (the default is 90 days), then you can utilize your reflog to find out when a branch reference was first created. Note that git reflog can take … Read more
Certainly, how it’s done depends on your shell. In Bash, you can use single quotes around the message and can just leave the quote open, which will make Bash prompt for another line, until you close the quote. Like this: git commit -m ‘Message goes here’ Alternatively, you can use a “here document” (also known … Read more
If you want to find all commits where the commit message contains a given word, use $ git log –grep=word If you want to find all commits where “word” was added or removed in the file contents (to be more exact: where the number of occurrences of “word” changed), i.e., search the commit contents, use … Read more