Tag: osx

Change color of GIT branch in OS X terminal

Is it possible to change color of the GIT branch name in OSX Terminal depending on git status. IE [green]master[/green] when files are in sync and [red]master[/red] when there’s files to commit?

`$PATH` at end or beginning of `PATH` export in .bash_profile (for Git on Mac)

I’m finding a lot of suggestions online for one of two basic ways to specify the PATH export in ~/.bashprofile for Git on Mac, but I haven’t found an explanation for which of the two is preferable and why. Could anyone describe the difference between these two placements of the $PATH? Thanks! export PATH=/usr/local/git/bin:$PATH export […]

Git remote add origin: correct URL and path to add remote repo on the local network

I am trying to set up a remote repository on a Mac on my local network. I have done the following: Set the sharing privileges on the remote, allowing access to all users (using System Preferences/Sharing) confirmed that I can SSH to the remote machine created the repo in the remote directory created a repo […]

How do I update git on OSX

I downloaded the latest version of Git (v1.9.x as of this post) from Github and installed it on my macbook. However after installation, when I went to the terminal and invoked ‘git‘ I was prompted to install OS X’s dev tools (XCode command line tools). So I went ahead and did this. Now when I […]

Inside a script, git cannot add to the index filenames with accented letters

I have a git cli wrapper that I use from inside a nodejs application, and I recently noticed that when I try to add files which have a name with non ASCII characters in it, like tèst.ò, those files are simply not added. No errors are generated. If I try to add a file which […]

Can't get Tower (OSX git GUI) to ignore file permissions – “could not lock config file .git/config” error

Issue: Can’t get Tower (OSX git App) to ignore file permissions Set up: OSX 10.9.5 Using Tower 2.1.3 set to use git from: /usr/bin/git (System; 1.9.3 (Apple Git-50) Have tried: Looking for a file mode setting in Tower / Tower docs From Terminal, have tried: $ git config core.fileMode false Which outputs: error: could not […]

Git aliases with long options not working

I have a .gitconfig file with some aliases in. The two aliases I have with long options don’t work. I have this: [alias] cam = “commit -am” cm = “commit -m” co = “checkout” last = “log -1 HEAD” log = ‘log –graph –decorate –pretty=oneline –abbrev-commit –all’ rm = “rm –cached” st = “status” Each […]

Git log –pretty=oneline appears to omit first 2 commits

This might be a bug but I’ve never seen a bug in Git before, and I can’t find any mention of this issue on the intertubes, so for now I’ll assume user stupidity. I use Git a great deal so I’ve set up an alias to bring up a birds-eye view of the git log: […]

How to manage Nuget repositories config files on git, when developing on Windows and Mac (files always modified)?

I’m beginning to have problems with the management of my repositories.config files of nuget packages. On Windows it is used the backslash as directory separator. On Mac it is used the forward slash. Whenever I work on any machine the file is overwritten, and subsequently it appears as modified on the git status. Is it […]

gitconfig error mac OS X 10.10

I’m trying to setup the global config settings for my git installation and when I run the command git config —global user.name “myname” I get the following error msg: error: could not lock config file /Users/vc/.gitconfig: No such file or directory my git version on my mac git version 1.9.3 (Apple Git-50) How can I […]

Git Baby is a git and github fan, let's start git clone.