0
votes
0answers
16 views

Daily crontab with hg, git and svn

Hello I have made a script that updates some repos from git merc and svn, then updates a git repo. The script works manually but doesn't work in crontab, here is the script: #!/bin/bash cd ...
0
votes
0answers
19 views

git-svn creates directories but doesn't check out content

I am migrating an SVN repository to Git using git-svn combined with some light bash scripts on Ubuntu 14.04. Locally. git-svn has worked fine so far (on Unix), but recently, it sort of gets stuck ...
0
votes
1answer
33 views

using git pull after ssh in script

I use public and private key to ssh to a remote server without password. After that, I need to perform "git pull" command. But I don't know how to pass the password into it. Trying the following ...
1
vote
1answer
26 views

Using a value from a file and updating it using a Linux script:

I have an automatic build script for my build server that builds Android applications. As part of this building process, I need to increment two parameters in one of the Android application files ...
0
votes
0answers
19 views

How to clean up output from `watch git gc`?

git gc updates the output as it runs, perhaps using backspaces, control characters, and/or curses. (I'm not an expert on this.) How can I modify my watch -n 60 git gc bash command so that the output ...
0
votes
1answer
41 views

how come git bash can call java tools (xjc.exe) with unix paths but not cygwin?

From CMD.exe, I can run xjc as follows: xjc "c:/schema.xsd" -p abc -d "temp" From git Bash, I can run xjc as follows: xjc "/c/schema.xsd" -p abc -d "temp" As far as Cygwin goes, I can get it ...
4
votes
3answers
1k views

How to execute commands as root in git post-receive hook

I just recently set up a remote git repo on a server for a web app running as an Upstart service. I'd like to use the post-receive hook to trigger actions that are required to update the application ...
0
votes
1answer
94 views

Color in bash prompt messes up git output

I changed my .bashrc to include export PS1="\033[1;33m\u@\h: \w>\033[0m" so that my shell prompt would be colored, but it seems the \033 messes up git output (log and diff, at least). I see ...
0
votes
1answer
204 views

Better setting of EDITOR environment variable to use Sublime Text 2 as system editor?

I want to use Sublime Text 2 for editing Git commit messages. Right now I have the following in my bash rc file: export EDITOR="sublime -nw" This works well if Sublime is already running. But if ...
1
vote
1answer
118 views

Accessing gitbash commands through conemu

I have tried to access gitbash command using conemu terminal, but I am unable to do so for some reason, it does not work for me. I check all the answers given including this Git Bash Here in ConEmu ...
2
votes
1answer
712 views

Git Bash - Windows - Different font size between start screen launch and explorer launch

I am using Git Bash on Windows 8.1 I see (at least) two different ways to launch Git Bash: 1) Start Screen -> Type Git Bash -> Press Enter 2) Windows Explorer -> Right Click Folder -> Select "Git ...
0
votes
1answer
145 views

Bash echo color as function output in PS1

I want my PS1 to display (if i'm in a git folder) the branch, and color the branch with red if working dir is dirty, and blue if it's clean. Here is what i came up to IBlack='\e[0;90m' # Nero ...
1
vote
2answers
2k views

How to get git bash back in Windows Explorer context menu

I've had git running on my machine for over a year. I have a folder in my C root called gitRepo, which contains all my various repos. For some reason, for one repo only, the git bash command is ...
0
votes
1answer
126 views

How do I access this environment variable in the windows git bash shell

I am trying to configure my windows portable git bash shell. When I execute env I get: ANT_HOME=C:\Program Files\WinAnt PORTABLEAPPS.COMVIDEOS:FORWARDSLASH=H:/Documents/Videos ...
0
votes
1answer
50 views

How to zsh pipe to grep to match remote branches beginning with 'orgin/'

I tried this: git branch -r --merged | grep '^origin/' But I get nothing... When I remove the caret: ✗ git branch -r --merged | grep 'origin/' origin/HEAD -> origin/master ...
0
votes
1answer
489 views

Bash script to pull from master every morning

I'm trying to automate my workplace as much as I can, but I'm kind of new to bash scripts. What is the best way to tell bash script to run git co master and if it is successful do git pull and once it ...
0
votes
2answers
261 views

How to change the $PATH in Mac OSX

I've installed git via the instaler and not with terminal with commands, and my $PATH changed, the path to the 'local' git was added the the end of the variable, and my $PATH changed to this: ...
2
votes
1answer
489 views

Setting up a shared remote git repository without root privileges (solved) using ssh keys to manage per user access?

I'll first explain my setup. I'm working on a non-self managed system on which I have an account without root/elevated privileges. On this system I want to share multiple git repositories to different ...
2
votes
1answer
81 views

What's the rule on using the word “git” as an alias?

I used to keep my git aliases in a file outside of my .gitconfig file, in the normal format of: alias gb="git branch --verbose" which worked great. But, after looking around at others' dotfiles, I ...
1
vote
2answers
165 views

Ignore NTUSER.DAT files when ls on Git Bash?

I use Git Bash as my terminal on Windows. When I ls in my Home directory, I see some NTUSER.DAT entries, which I assume are system files. They don't appear when I run dir in the default Windows ...
0
votes
1answer
640 views

useradd denies home directory creation Ubuntu 13.04

I'm trying to set up a git user, but am getting the error useradd: cannot create directory /srv/data/git when running this command sudo useradd \ --create-home ...
0
votes
2answers
628 views

Uninstalling Homebrew messed up git

I uninstalled Homebrew using http://superuser.com/a/203740. After running the above commands, I can't find .bashrc and .bash_profle. All files are gone from Documents , Desktop and Downloads :'( ...
0
votes
0answers
26 views

Uninstalling Homebrew messed up git [duplicate]

I uninstalled Homebrew using http://superuser.com/a/203740. After running the above commands, I can't find .bashrc and .bash_profle. When I do git status on /Users/ava it shows: # On branch master ...
1
vote
2answers
2k views

How to auto commit to my git repository using cron?

I look into a lot of answers about this subject, but something is wrong here, let me explain. I create this script, to make my cron cleaner :) #!/bin/bash cd ...
4
votes
1answer
87 views

Using su with commands

Ubuntu Server 12.04 On a remote server that I ssh into I have set up a special user with: sudo adduser --system --disabled-login --disabled-password --group suser to run some maintenance functions. ...
0
votes
1answer
656 views

Adding Git repo and branch to Tmux status line

I have found a Tmux configuration file that shows how to add the Git branch to the Tmux status line, however It just shows [[ branch ]] no matter if I am in a Git repo or not. I am not sure if this ...
1
vote
1answer
704 views

what is the proper SSH command for logging into Github

After following the standard roadmaps to setup a github environment, I inmediatley encounter errors. I like to see these clarified. I have put a more detailed question below after the code garble that ...
3
votes
4answers
4k views

SSH remote command no reading all environment variables

I have declared some "PATH" variables in the ".bashrc" file of a remote machine. When I login to the remote machine, all these "PATH" variables work fine. But when I do a "ssh user@remote env", the ...
2
votes
2answers
412 views

How do I disown/detach a process from the Git Bash terminal that come with Git's Windows installer?

I would like to run commands from the terminal (mostly Python servers) and essentially daemonize them. I am running the MinGW terminal "Git Bash" that comes with the Windows installer for Git. ...
2
votes
1answer
637 views

git push to github via cron on mac

I'm trying to use git push in a bash script being run by crontab to push a commit to github. At the end of the script I'm doing this: # script processes some files, then: git add -A git commit -a -m ...
3
votes
3answers
177 views

What unix command would I be able to write a Bash Shell script that would create files in a series of directories?

I need to write to a shell script that takes a list of directories from file (the directories would be on different lines) and then for each of those filepaths it would create a hidden dummy file ( ...
0
votes
1answer
419 views

Trouble modifying .bashrc file to alllow sublime text 2 in git-bash

I would like to change or add the ability to open files when working with mingw32 with a different text editor (in my case sublime text 2). I would like to be able to do the following from the ...
2
votes
1answer
349 views

Execute git pre-commit hook only if files in certain directory modified

I am trying to create a bash script for a git pre-commit hook. Whenever a commit is made, I want to check if files in a certain directory are part of the staged files and if so, run a command (Grunt ...
2
votes
1answer
68 views

Trying to create bash function which collects and quotes all arguments, but it doesn't work if args contain brackets or single quotes

I saw the following shortcut for "git commit" suggested somewhere: function gc { git commit -m "$*" } This is supposed to allow you to write the commit message inline in the shell, without quotes ...
1
vote
2answers
58 views

Open remote git repository from command line

I'm using git on a Mac, and I'd like to know if there's a command to open the remote repository (origin) in a browser from the terminal.
3
votes
2answers
1k views

how do I add the 'tree' command to git-bash on Windows?

I'm using git-bash on Windows 7. I'd like to see a tree of the current directory. However: jcollum@DEVELOPER01 ~/Dev/express_coffee $ tree . ...
-1
votes
3answers
2k views

git: command not found via bash

I'm quite new to bash, so I'm sorry if I'm asking something silly. Long story short, I'm trying to run the following bash script: #!/bin/sh ACTION="init" # init or push USERNAME="username" ...
2
votes
4answers
1k views

Can't install Git

Im following the tutorial below to install git. https://help.github.com/articles/set-up-git However when I get to the end where I need to install the helper into the same directory where Git itself ...
2
votes
2answers
717 views

Accessing a remote Windows “Git Bash” prompt from a Linux machine?

"Git Bash" is a program that comes with Git for Windows. In order to get to a Git Bash prompt on a remote Windows machine from a linux machine, my usual process is to use remmina to open an RDP ...
0
votes
1answer
202 views

Git commits via command-line fail, showing > symbol

I'm new to bash. After I've staged files to my local git repository and typed in the commands to commit: git commit -m "Descriptive message" Git (or is it terminal?) stops dead, showing the ...
1
vote
1answer
1k views

Mountain lion and git-completion

I have ML with Xcode installed tools (git coming from there). Later I've installed brew and install bash-completion, but git commands still not auto-completed. Brew has no such package. Google does ...
1
vote
1answer
84 views

Why does git branch info clear upon making a new tab in terminal

I've written a bash script to put git info into my bash prompt, along with still keeping the terminal's pwd in the title bar, to allow for new tabs to be opened at the current working directory. It ...
45
votes
2answers
11k views

Git Bash Here in ConEmu

How do I create a right-click context menu entry to open Git Bash at a given folder within ConEmu? See Git Bash Here in Console2 for the equivalent question for Console2.
1
vote
1answer
1k views

git bash-completion on mac osx does not work following standard installation instructions

I read a bunch of instructions for installing bash-completion for git, and settled on the macport solution, which is, for example, mentioned here: How to get git-completion.bash to work on Mac OS X? ...
0
votes
1answer
263 views

Bash Prompt Not Showing Colours (git)

I have the following in my .bash_profile, to give me git branch info in my bash prompt: # Configure colors, if available. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then ...
0
votes
1answer
246 views

How can I set a git config item as a function?

I'm trying to set up the gist gem, but I don't want to have my GitHub password stored as an environment variable or git config item. The README from the GitHub repo explains, You can also define ...
0
votes
1answer
71 views

git-number not working on Linux: sh: git-id: not found

I've set up the script git-number on my Cygwin computer without any problems. I've put all three required scripts in a folder in my home directory called bin/ and everything works fine. Now I'm trying ...
1
vote
2answers
121 views

How can I see a detailed difference between files in the last git pull?

I run a git pull and see that a file has changed. I would like to see a line by line difference of what has been added or removed. I tried git diff 12345..67890 , (newest commit)..(second newest ...
2
votes
2answers
506 views

Git completion __git_ps1 really slow on Mac

I've had __git_ps1 in my bash prompt for a while, but just recently (I noticed it after I did some messing around with Homebrew and rbenv), it has slowed down my prompt horribly. When I'm in a git ...
0
votes
1answer
353 views

run program packed in sh file

I downloaded jgit packed in sh file and ran it in mingw. I watched in process list that java process was started just with main class and parameters "c:\Program Files\Java\jdk1.6.0_26\bin\java.exe" ...