New answers tagged

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 ...
Destroy666's user avatar
  • 2,550
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 ...
Geert Smelt's user avatar
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
T.Todua's user avatar
  • 3,725
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)"...
Dan Cecile's user avatar
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 ...
gkpln3's user avatar
  • 151
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 ...
gormandizer's user avatar
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 ...
Dee's user avatar
  • 621
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 ...
MrTux's user avatar
  • 484
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 ...
user1686's user avatar
  • 415k
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
Rafael Eyng's user avatar
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 ...
Guildenstern's user avatar
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 ...
Guildenstern's user avatar
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 ...
Guildenstern's user avatar
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/...
Guildenstern's user avatar
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.
Guildenstern's user avatar

Top 50 recent answers are included