New answers tagged

1

Sounds like you want a hard link ln sourcefile /some/git/repo/targetfile Only any good if the source and target locations are within the same file system. Otherwise you’ll have to settle for a copy or a symlink.


0

Building up on the answer above by @nagu, and the other linked answers, I was able to get git log -G to only show the relevant hunks. First create a script somewhere in your $PATH with this content: #!/bin/bash # pickaxe-diff : external diff driver for Git. # To be used with the pickaxe options (git [log|show|diff[.*] [-S|-G]) # ...


2

If --git-dir is present on the command line, the completion code recognizes it and takes it into account when looking for things to complete, if your zsh is recent enough (≥5.3). It does so by passing the argument to --git-dir as the environment variable GIT_DIR. For example, to complete remote names after git fetch, zsh runs git remote. After git --git-dir=/...


2

As usual, I managed to solve the problem after I actually got around to ask about it. I simply set the pager.log git config variable to less -RFc; the relevant switch is -c as far as I understand: it tells less to repaint the screen from bottom to top instead of doing so vice versa. Apprently, this was indeed not a ksh issue. My apologies.


0

I think your issue is that git push is actually asynchronous. Assigning the result to a variable and then echoing the result should work. Something like the following should output the response you're expecting. #!/bin/sh message="auto-commit from $USER@$(hostname -s) on $(date)" GIT=`which git` REPO_DIR=~/org cd ${REPO_DIR} ${GIT} add --all . ${GIT} ...


0

There is a description in the git-http-backend manual. Variable GIT_PROJECT_ROOT is set to a parent path of all repositories and similar to the Apache DocumentRoot directive, it is used to translate an URL-path to the filesystem: URL TRANSLATION To determine the location of the repository on disk, git http-backend concatenates the environment ...


0

You can save the password in a config file and use the same file as 'source /path-to-config-file.If GIT_USERNAME and GIT_PASSWORD is the variable then use git clone http://$GIT_USERNAME:$GIT_PASSWORD@some_git_server.com/project.git Check the output using success=$?


0

ls | xargs -P10 -I{} git -C {} branch You can use any git command in place of branch. for e.g: ls | xargs -P10 -I{} git -C {} pull --rebase ls | xargs -P10 -I{} git -C {} fetch Only caveat is output may not contain the directory name. But if it is not an issue, this command is simple.


Top 50 recent answers are included