I’m often building servers where the goal is to install some software that is stored in Github. The process goes: Install Git. Clone the Github repo. Checkout the right branch. Steps 1 and 2 can be pretty slow (a few minutes). Are there any tools that would allow me to cut to the chase, step […]

I am trying to set the text editor that will open when Git needs me to type something (e.g., message for a commit). I am on Mac OSX 10.9.5 and using bash. I have configured the default editor to TextEdit – my .gitconfig file looks like this: [user] name = My Name email = MyEmail@host.com […]

I’m writing a shell script that makes some git calls. In particular, I’m looking for a way to figure out if a git rebase call is successful or if there is a merge conflict. This is what I have so far. returnStatus=$(git rebase master); if [[ returnStatus == 1 ]]; then break; else echo $branch; […]

I have two branches one is master and another one level1. Now level1 is the latest I need to hard reset master to level1 normally in git bash I can do that by following command. $ git checkout master $ git tag old-master-branch $ git reset –hard level1 $ git merge -s ours origin/master $ […]

Me along with a team of developers use fabric to deploy code to remote server, Whenever a new file is created and added to the git repo the default permission will be -rw–r–r which makes it impossible for other developers to update this file (all users belong to same primary group). I want the permissions […]

I have a GitHub repo located here. I just commited a change to my repo and pushed to master branch, as I always do. I entered my account name and password, and the commit was pushed to GitHub. However, when I checked my GitHub commits page, I see a user that is not me. Did […]

How do I list everything except markdown files? I have tried, as show in the code below, to run ls-files with the –exclude flag, but the excluded files are still shown in the output. My git version is 2.6.4 (Apple Git-63) $ git ls-files ChromeExt/read-coffee Node/README.md Node/web-scraping README.md $ git ls-files –exclude *.md ChromeExt/read-coffee Node/README.md […]

I’m not great with bash, but i’d like to write a shortcut, such as ‘opendev’, that opens a url in a browser and opens the current git topic branch i’m on. (only needs to work on os x). Inspiration here is from heroku CTL’s “heroku open”. I’ve got the basics here but i’m not sure […]