I tried to update git svn repo (git svn rebase) with cron job, but I get this error.
usage: git-cat-file [-t|-s|-e|-p|<type>] <sha1>
error closing pipe: Broken pipe at /usr/local/libexec/git-core//git-svn line 4290
cat-file --batch: command returned error: 129
I've added git path in cron script, seems not helping.
export PATH=$PATH:/usr/local/libexec/git-core/
git svn rebase is working properly when I login with bash. What else should I do to make it run as cron job?
Seems it is still a PATH problem. After I copied exact PATH from bash env, problem solved.
export PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/libexec/git-core/
Related
When I run git branch -a in a folder with a .git directory, NOTHING is returned. I have been working in this directory for a few months and git branch used to return all local and remote branches.
My PyCharm IDE can still see all of the branches just fine.
I have searched for answers throughout SO and other sites to no avail.
git branch used to return all local and remote repositories.
Only git branch -a would return all local and remote tracking branches (branches, not "repositories").
Check first if, as commented, this is a pager issue. Change shell (if you are on Windows, switch between CMD, Powershell or bash, to see if the issue persists)
git --no-pager branch does work!
How do I fix git branch based on this info?
As noted in git config:
To disable pagination for all commands, set core.pager or GIT_PAGER to cat.
git config core.pager cat
But for disabling it only for git branch, you have various options as described in the similar question "How do I prevent 'git diff' from using a pager?"
An alias for git -P branch would be one of them. (-P is --no-pager)
I am migrating a SVN codebase to Git and need to create more than 30 projects. Hence I approached this problem by automating the steps in a shell script.
Below is the code snippet
test.sh
#!/bin/sh
svn2git http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE --trunk trunk/SOURCES/Project1 --notags --nobranches --authors /Users/praveen/users.txt --verbose > log.txt
git remote add origin git#gitlab.yyy.xxx.com:PROJECTSUITE/Project1.git
git push origin --all
I am able to perform this migration successfully when the commands are executed individually from the terminal.
Terminal
$ svn2git http(s)://svn.yyy.xxx.com:1080/SVNROOT/MERLINSUITE --username praveen --trunk trunk/SERVER_SOURCES/MerlinTMS --notags --nobranches --authors /Users/praveen/users.txt --verbose
Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk/SOURCES/Project1 http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE
Initialized empty Git repository in /Users/praveen/projectFolder/.git/
Running command: git config --local --get user.name
Running command: git config --local svn.authorsfile /Users/praveen/users.txt
Running command: git svn fetch
W: Ignoring error from SVN, path probably does not exist: (160013): Filesystem has no item: File not found: revision 100, path '/trunk/SOURCES/Project1'
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history.
This may take a while on large repositories
....
....
success :)
But when the above shell script is executed using verbose it gets stuck. The project tested was around 30MB in size.
log.txt
Running command: git svn init --prefix=svn/ --no-metadata --trunk=trunk/SOURCES/Project1 http(s)://svn.yyy.xxx.com:1080/SVNROOT/PROJECTSUITE
What am I doing wrong? Is it that svn2git cannot be called within a shell script?
I've been using git along with a project in order to have version control for quite some time now. But all of a sudden, it stopped working! I noticed that while pushing new changes, because I received this message:
/home/user/bin/git/bin/git: No such file or directory
Also, whereis command is unable to find where the program named git is present:
> whereis git
git:
Any idea on how I can solve this?
It looks like you have a dead link to a local version of git (which you might have removed?) in your $PATH. Try which git or find / -lname /home/user/bin/git/bin/git to spot it.
i have a weird issue. Im using TortoiseGIT (Win7) and my repositories are placed on a vritual server (Debian), where im using gitolite and SSH keys.
I can clone the repository to my PC, i can run Fetch, Push, Commit, Sync .. everything, but when trying to Pull the changes from server Pushed by other contributor, the following error appears:
git.exe pull -v --progress "origin"
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
git did not exit cleanly (exit code 128)
I don't understand, why just the pull command is not working .. thanks for any help.
I can make a clone of the repository, with the contributed changes .. but can not Pull the changes to created repository on my PC.
I encountered this same issue after changing the git Bash executable sh.exe to be always run as administrator (to get round another problem). It then left git unable to access it under certain scenarios and caused various "Maybe git-* is broken?" errors. Perhaps this might help someone...
Uninstalling old Git and reinstalling the latest build fixed this issue for me.
Here's a link to the installers
Link to get installers
My exact error message was
C:\Program Files (x86)\Git/libexec/git-core\git-pull: line 304: exec: git-merge: not found
fatal: 'pull' appears to be a git command, but we were not
able to execute it. Maybe git-pull is broken?
The error message is very much linked to Git, and comes from help.c:
static const char bad_interpreter_advice[] =
N_("'%s' appears to be a git command, but we were not\n"
"able to execute it. Maybe git-%s is broken?");
That is similar to issue 40 (of another GUI, here terminal-ide).
In that case, it was due to the remote Git installation, which was incomplete
(Comments 3 of issue 19)
git-merge was also missing from install, can be fixed with
$> ln -s git git-merge
in system/bin/
The resolution might not be exactly the same in your case, but it could be related to a faulty Git installation.
I see that you're able to run "git fetch". If you can also run "git merge", running the sequence "git fetch" followed by "git merge" will accomplish the same thing as "git pull".
Source:
http://git-scm.com/docs/git-pull
I'm trying to convert a local SVN repository to git using git-svn under cygwin and failing. This is what happens:
$ git svn init -t tags -b branches -T trunk file:///cygdrive/e/repository/project
init: command returned error: 127
Any ideas?
I installed msysgit and it failed as well, but with a much better error message (Expected FS format '2'; found format '4') which turned up helpful discussions on Google. It seems like git-svn can't handle the local filesystem format of a current TortoiseSVN. The solution is to run svnserve and use the svn: protocol via localhost.