0
votes
1answer
14 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
27 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 ...
3
votes
3answers
781 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
78 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
159 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
105 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
517 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
126 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
115 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
447 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
225 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
454 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
79 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
150 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
562 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
592 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
25 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
86 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
580 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
669 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
378 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. ...
1
vote
1answer
606 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
175 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
394 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
327 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
66 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
57 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
666 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
186 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
10k 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
262 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
240 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
68 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
120 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
488 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
349 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" ...
3
votes
1answer
621 views

git log behaves like less

git log -{n}, when -n is sufficiently small, doesn't open in less it simply prints it to the screen. That's desirable. git log -1 should not take up the full screen. Unfortunately, in MINGW's ...
1
vote
1answer
167 views

git --interactive keybinding problem for left/right/delete

I am using zsh on my Mac and after some bindkey trickery I managed to get left/right/delete/backspace to work on zsh (and bash). In git --interactive, this does not work correctly though. When I try ...
0
votes
2answers
155 views

Is there an alternative to ~ on bash?

My keyboard doesn't have a ~ key, and the Git Bash on Windows doesn't allow me to type that symbol with Alt-### combinations nor to paste it in. How can I do this?
1
vote
6answers
505 views

navigate with bash

I'm very new to working with the terminal on my macbook pro and am trying to understand how to navigate into certain directories with it. I can't seem to get out of my username directory. I'm trying ...