New answers tagged git
0
votes
How does git determine the value for HOME when not set?
It is stated how the path is determined e.g. in the official documentation:
By default, git config will read configuration options from multiple
files:
$(prefix)/etc/gitconfig
System-wide ...
0
votes
Adding Git repo and branch to Tmux status line
Like mentioned by @Jasha, the status line does not update when you change branches. However, Tmux has a window option called pane-border-status. Combining @Nathan Kot's answer with this option results ...
0
votes
How can I fix the error "fatal error - cygheap base mismatch detected" when using git on Windows 10?
Renaming msys dll might help: https://stackoverflow.com/a/74463416/2377343
You might try disabling ASLR: https://stackoverflow.com/a/76296598/2377343
0
votes
Can you GPG sign old commits?
Here's how to re-sign all of the commits on current branch while preserving original author and timestamp:
git rebase -i --root --exec 'env GIT_AUTHOR_DATE="$(git log --no-walk --format=%ad)"...
0
votes
Docker workflow with multiple packages and shared sources
I know it's a bit late, but being faustrated by the same issue, I've ended up writing my own framework for generating Dockerfiles.
It's called Sand and you can find it here
It allows you to share code ...
1
vote
git remote update not working
I had the same issue and finally resolved it. This is by no means a complete and comprehensive answer but thought I would share my solution. In my case when I first cloned the source repository ...
0
votes
TortoiseGit: How to show files with differences between branches before merging
I needed to merge that way because of the need to merge features of a derived project back to base project and there are 2 types of file:
supposed to be the same (regular merge)
supposed to be ...
1
vote
Accepted
TortoiseGit: How to show files with differences between branches before merging
Open the logdialog, select the revision on the branch you want to merge. Open the contextmenu and select "Compare to working tree". Then you'll get a diff of all files. When you now ...
3
votes
Accepted
What permissions does a user need to run `git ls-remote`?
A system utility user 'gremlin' needs to check that this is a real Git repository
The various options of git rev-parse might also be suitable for that if you're looking to check whether it's a bare ...
0
votes
Pipe (a patch in my clipboard) to `git apply`?
The focus of the question is MacOS, but for Linux you can also use either:
xsel --clipboard --input | git apply
or
xclip -selection clipboard -o | git apply
0
votes
How many objects is too many for a git repository?
Considerations ahead of time
Before starting the repository there is one thing you need to decide on:
Can I rewrite the history?
If you can then you can change the history if you run into ...
0
votes
Without rebasing, how to push a local repo to a new remote github repo initialized with a license file?
Why it happens
git pull does a merge by default. But your two main branches (the remote
and your local repository) has unrelated histories (no common ancestor),
and merge refuses to do such a merge by ...
0
votes
How to write wrapper function for git commands
Your approach is way too complicated considering what it does. I would
think that a custom Bash function or a custom script would be a bit too
much for a use-case that exactly fits in a Git alias. But ...
0
votes
cut: the delimiter must be a single character
It looks like you want to get the name of all your local branches and
your remote-tracking branches.
I would do this instead:
git for-each-ref --format='%(refname:short)' \
'refs/heads/**' 'refs/...
1
vote
Git Log of a particular file from a particular commit only
git log <the rest of your flags> -1 b8800d8 -- "${FileP}"
b8800d8 makes it start from that commit and -1 limits the output to
the first commit.
Top 50 recent answers are included
Related Tags
git × 2665ssh × 354
linux × 310
bash × 254
github × 246
windows × 235
macos × 191
command-line × 108
version-control × 103
ubuntu × 101
windows-7 × 82
terminal × 69
windows-10 × 68
gitlab × 68
svn × 66
zsh × 65
cygwin × 60
git-bash × 56
repository × 53
vim × 52
permissions × 49
mac × 47
powershell × 43
shell × 43
clone × 41