git-history | stream git history | Version Control System library
kandi X-RAY | git-history Summary
kandi X-RAY | git-history Summary
stream git history
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-history
git-history Key Features
git-history Examples and Code Snippets
Community Discussions
Trending Discussions on git-history
QUESTION
This is the size of my .git folder:
...ANSWER
Answered 2021-Feb-26 at 23:58Commits containing the huge file are still handled by the reflog so they can't be garbage collected just by a git gc
.
You could find some good commands in the answers to this question: How to remove unreferenced blobs from my git repo
like
QUESTION
I'm trying to clean up a git repository of latex code that contains the generated pdf files, because these files have caused the repo to balloon up to a size of 300mb.
Adapting a bit from the answer here How to remove file from Git history?. I tried the following command:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.pdf' HEAD
This reduced the size a little, but not as much as i'd hoped. When I then try the script found in the answer to this question: How to find/identify large commits in git history?, to find which files contribute to the size, it still shows several pdf files. However, if i try the script found in this question: Which commit has this blob?, it cannot find any commit that contains the file.
I have removed all branches except the local branch. I have not pushed the changes to the remote.
Is there any reason these files would still persist in the history somewhere? What other things can I try?
...ANSWER
Answered 2020-Dec-18 at 13:35You may have blobs still present just because the garbage collector didn't collect them.
Try cloning your local repo, and check the size of the .git/
directory in that new clone :
QUESTION
I use vscode. Sometimes I seem to click or type something accidentally and a timeline view (similar to the one described in How can I view the Git history in Visual Studio Code?) appears.
How do I close the timeline view?
I thought the option to hide the timeline would be in View > Appearance but I can't see any references to 'timeline' history' 'commits' etc.
Right now I just close the file and reopen it but I'm sure there's a proper solution/
...ANSWER
Answered 2020-Nov-25 at 16:17You probably hit the shortcut key for the command: GitLens: Toggle File Blame Annotations
QUESTION
I have a question similar to this one but with the availability of filter-repo I wonder if there is a better approach now.
I have a large-ish repo with a few problematic commits that I want to clean up via rewriting history (I will not be pushing back to origin, this will be the new 'master' repo going forward, the original will remain as-is in read-only mode in perpetuity).
There are a number of commits where a file has been replaced with a large binary file. There are corresponding commits that fix the problem by re-instating the non-binary file.
Given a set of these commit pairs, I could conceivably use rebase -i to manually fixup the commits. But there are many commits, and I want a scriptable solution. Can filter-repo be used to accomplish this? I can imagine using --commit-callback and checking the filenames in the file_changes, but I also need to check the size to determine if this commit is one of the problematic ones.
...ANSWER
Answered 2020-Jul-19 at 16:06You could, as in this issue, write a python program like black_history.py
which would:
- call filter-repo
- with a commit-callback
- which has the hability to!
- check the content filenames
- dump the right ones on disk, where you can check the size
That is:
QUESTION
I managed to get a custom button added to the Git history context menu thanks to the help offered here.
I'm continuing work at the same extension and am again stuck. Once the button I've added to the context menu is clicked I need to get a reference to the commit that is selected when it is clicked. The idea is that I then need to grab the code changes associate with that commit.
I've gotten as far as getting a reference to the ActiveWindow which has a caption of "History - master". Which makes me believe I'm close. However, ActiveWindow.Selection is null. So I'm not sure where to go next to get the selected commit.
This is what I'm using to get the ActiveWindow property.
...ANSWER
Answered 2020-Jun-23 at 09:38Took forever, but I finally managed to get at the selected commit. It involves reflection because a lot of the types used in the git extension are internal. There's got to be a better way to do this.
The IGitCommit that I'm able to retrieve doesn't have the changes for the commit populated. Hopefully getting the changes that are part of the commit isn't as challenging.
QUESTION
How to copy one repo entirely to another repo with history.
I don't want to use fork or mirroring options, I tried out branch-filter options but it is limited to one directory. git filter-branch --subdirectory-filter /../RepoA/dire1
I was referring below url https://medium.com/@ayushya/move-directory-from-one-repository-to-another-preserving-git-history-d210fa049d4b/
...ANSWER
Answered 2020-Jun-12 at 10:21You can try using the --index-filter
instead of the --subdirectory-filter
.
QUESTION
I have one of my passwords commited in probably few files in my Git repo. Is there some way to replace this password with some other string in whole history automatically so that there is no trace of it? Ideally if I could write simple bash script receiving strings to find and replace by and doing whole work itself, something like:
...ANSWER
Answered 2017-Nov-07 at 14:18First, find all the files that could contain the password. Suppose the password is abc123
and the branch is master
. You may need to exclude those files which have abc123
only as a normal string.
QUESTION
I have a single git repository containing multiple projects. I have pulled these projects from different git repos using the method described here:
Example Repo Structure:
ProjectOne
- ProjectA
- ProjectB
- ProjectC
Now, the original git repo of ProjectA is constantly under development and I need to periodically pull in latest changes to my ProjectOne repo. I want to keep the commit history of ProjectA when pulling in changes. Does anyone here has any idea how to do it ?
...ANSWER
Answered 2020-Apr-22 at 05:30Another approach would be to add ProjectA
as a submodule of ProjectOne
QUESTION
I wish to erase from the git history the contents of a folder (which can recursively have folders). However, some older commits don't even have the folder while some newer commits have files in that folder that I want to keep.
Let's say that folder is foo
(in path /path/to/foo
) and the files to keep are called bar1
and bar2
(e.g., /path/to/foo/bar1
).
I realize this problem is not new. In this question, a long and hard-to-read (for a beginner at least) script is used. This question is more up-to-date and uses git filter-branch
but I didn't understand what the solution ended up being. Finally, this question is probably the most similar but the answer is not "dissected" for someone with no advanced knowledge of git to understand, so it doesn't give me the confidence to try the commands out.
From what I saw, the current approach for git 2.17 is to use git filter-branch
for each branch. Then use either a tree-filter
or index-filter
(from the documentation I'm not able to see the difference in use cases). Finally a git rm
command with a regex that matches the contents of foo
except bar
. The first part of the regex would probably be simple (/path/to/foo/*
) but I'm not sure how to add the exceptions.
I would greatly appreciate it if someone could break this all down when presenting a command that solves this issue.
...ANSWER
Answered 2020-Feb-23 at 16:31git filter-branch --index-filter '
dir=path/to/folder
git rm -qr --cached --ignore-unmatch $dir
git reset $GIT_COMMIT -- $dir/file1 $dir/file2 $dir/file3
'
QUESTION
I'm getting over 1500 errors like this, when I try to build an updated Xamarin.Forms
project with Jenkins
:
App.xaml.cs(24,32): error CS0012: Der Typ "Object" ist in einer nicht referenzierten Assembly definiert. Fügen Sie einen Verweis auf die Assembly "netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" hinzu.
Translated error:
CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
If I build the project with the same machine, but within Visual Studio 2017
it works without problems (as on my local machine). The build command for Jenkins
looks like this
ANSWER
Answered 2020-Jan-09 at 14:02I think I solved it with this
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git-history
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