Git is an open-source DVCS (Distributed Version Control System).

learn more… | top users | synonyms

-4
votes
0answers
29 views

Modern BIOS and Modern OS, what think about? [on hold]

I'm developing two major open-source projects and looking for opinions. More information in this quick note and in their respective repositories of projects: ...
3
votes
1answer
33 views

Bash function to parse git status

I have a function here and wondered how well this can be refactored. I currently have this: ...
3
votes
0answers
19 views

Automatically push git submodule's parents recursively

I'm absolutely terrible with .bat files, but sometimes they are just needed. Right now I'm working on a project with quite some submodules, which have quite some ...
4
votes
1answer
67 views

GitHub API client

Here is my Haskell program designed to list all of my GitHub repos along with their descriptions and languages via the GitHub JSON APIs: ...
10
votes
3answers
797 views

Date of latest GitHub project release

I needed a clean, simple and robust piece of code to retrieve the date of publication of the latest release of a given GitHub Project. My constraints were that it needed to be written in the C++11 ...
5
votes
0answers
40 views

Git Insert Delete Graph

I attempted to recreate the github code frequency graph(example) with a daily granularity using perl and git log. How did I do, ...
2
votes
1answer
68 views

GitHub Auto Copy Committer via API

I did write the GitHub Auto Copy Committer. The purpose is to copy an existing public GitHub repository to in another repository - commit per commit. It's reason is not a full copy of a ...
2
votes
1answer
25 views

Git post-receive hook writen as a POSIX shell script (utilising a named pipe)

This is my first piece of code to post here. I wrote this script as a post-receive hook for a Git repository but I’m not so concerned with the Git parts (I’d like to have the part marked with ...
1
vote
1answer
60 views

Gathering metadata on files in GitHub

I am a relatively new programmer and am currently working on something with the egit GitHub client library which requires me to iterate over a bunch of values and if a condition is met, add a bunch of ...
5
votes
0answers
127 views

Automate branch merging with git

I wanted to learn how to use python to replace bash, and found this old post from 2008 or 2009. The output of git has changed a bit, though, so I decided to remake it. I also decided to try out ...
6
votes
1answer
50 views

Perl pie alternative

Running on Cygwin, I cannot easily use perl -pi -e because it will always produce .bak files even though I don't want them. I ...
8
votes
1answer
104 views

Bash script to remove unwanted git objects

A while ago, someone at our office thought it'd be a great idea to start tracking a number of fairly large binary files in one of our more important repositories. We noticed our builds were slowing ...
3
votes
1answer
23 views

Bash Compress Managed Directory Ignoring .git, bower_components, node_modules, etc

Fairly easy way to compress a wordpress plugin (or similar) as a zip file without including all the dependencies used to create and manage the development, but which don't belong in the final product. ...
8
votes
1answer
79 views

Adding SecureString support to Lib2GitSharp

A library that I use doesn't support SecureString in its credentials for connecting to GitHub, so I'm submitting a pull request to add it. I know it's not ideal to ...
1
vote
0answers
93 views

Local branch update script using Git and PHP

I'm using Git and PHP to create an update script which is sync local branch and the master. It checks about new updates, and if yes, it proceeds to the Git pull request and any response got from the ...
5
votes
2answers
209 views

Use git to get SHA-1 of repo

I've created the function below to get the SHA-1 of the repository used by my CI server. The hash is then used to update the pass/fail status of the commit on GitHub. I'm a python amateur. What ...
3
votes
0answers
98 views

Git merge script

The branches I need to merge are called test and test-passed. Merging will always be fast-forward, from test to test-passed as commits to test-passed are only done automatically from test. This is ...
2
votes
1answer
165 views

Python script that does a git diff

I have created a small script that aims on comparing two versions of a file by doing a git diff. Is there a better way to code it? ...
8
votes
1answer
324 views

Python-based Git pre-commit hook to manage multiple users/Git identities

A couple of months ago I posted a bash script to manage multiple Git identities as a solution on Stack Overflow but soon found the hook isn't flexible enough. Thus I decided to rewrite the hook in ...
12
votes
1answer
2k views

Clone GitHub repository using Python

I want to backup my GitHub repositories since there is news about blocking GitHub in India. I wrote Python code to automate this and would like for it to be reviewed. ...
4
votes
2answers
230 views

Team git commit cleaner

I cleaned a big repository for my team with this Python code. My goal was for every developer in my team to check if some bad email are in the commit, and replace the information by the good one. I ...
2
votes
0answers
78 views

Delegating which module's functions to use based on user input

My main concern with this code is this problem - given that this program could generate a prompt string from Bash, Zsh, Fish, etc., I would like to make this code easily extendable so people can add ...
5
votes
1answer
84 views

Bash script for Git & VSS interop

I have been slowly evolving some code for Git and VSS interop based on a quest I started a while ago And the code is now working, some parts have been updated without test (such as the init) and I am ...
7
votes
1answer
68 views

Monkeypatching __builtin__ in tests for mocking

I'm testing a little magic behaviour of my script that automatically reads from ~/.ghtoken to do automagic authentication on GitHub API requests. I want to test ...
4
votes
1answer
132 views

Ruby script to create git repos

I wrote my first ruby script, by this tutorial. It creates a local and remote git repo. I have been working for about 3 years with PHP, and somehow I find that my ruby script looks incredibly ugly. ...
2
votes
2answers
56 views

Small CLI note manager and publisher

This is my first attempt at trying to make a CLI note manager, than can be easily published on the web. I have made one note and you can see it live here. I have added some comments, and placed the ...
2
votes
1answer
140 views

Bash script for tagging the current git workspace including uncommitted changes

I use the following script to autotag the current workspace while building even if there are changed (not committed) files: ...
10
votes
1answer
236 views

Git hook that checks out branch that was pushed to this repository

Description If you install this hook in your repository and push branch foo-automerge to this repository, this hook will merge this branch into working copy if: ...
6
votes
1answer
323 views

Git commit-msg URL shortener

I have just written my first git hook script. It is very simple that simply finds any URLs in the commit message and uses the Google URL shortener to rewrite the URL nicely. it is located here. I ...
10
votes
3answers
1k views

Git pre-commit hook to check that changes to certain files only happen on the master branch

As a beginner in Ruby, I am trying to optimize this script that is a client side pre-commit hook for git. Was hoping I could get a review to ensure I am following all ruby idioms, and to ensure I ...
4
votes
3answers
146 views

Git script that fast forward merges and deletes the old branch

This script fast forward merges a branch and then deletes the old one. I normally run it like this: git m master feature Here's a link to the gist. ...
1
vote
1answer
37 views

BadCafe as a git object short hash

as I was reading the Git Internals in the Pro Git book, I decided to see what objects I need to create to have the short hash say something funny. To do this, I have written the following code: ...
3
votes
3answers
687 views

Base for iterating over git history - is this code clean?

I wanted to do some statistics over the history of a Git repository. At first I tried using GitPython, but it wasn't as trivial as I imagined it to be. In the end, I just call the necessary git ...
10
votes
2answers
2k views

Missing level of technical depth (Common Ancestor)

I recently have given a coding test in a reputable IT company. There were three coding questions. They refused me by saying that as we felt they didn't demonstrate the level of technical depth ...
8
votes
1answer
413 views

Bash script to clone all public repos or gists for a specified user, optionally to a directory of choice

I wrote this script as a way to backup and/or download quickly a set of repos or gists from a user. I don't have any major concerns but I'm a noob at bash scripting, and I've been scouring the ...
6
votes
1answer
580 views

Script to checkout multiple repositories to a certain commit hash

I am writing a script which checkout a git repo to certain commit hash, do something and switch back to master. The purpose of ...
6
votes
1answer
347 views

Function launching default editor

I have written a function that launches the default editor set in git config, right now I have managed to get it working for Sublime, nano and Vim. ...
8
votes
2answers
2k views

Git command: push the latest commit and email the diff in colour

This is my first attempt a for git command I can use to push the latest commit and email the diff. Story behind how it came up: http://goo.gl/3NEHvn Revision 1 (Scroll down for 2nd Revision) ...
3
votes
1answer
721 views

Make a git repository read-only over ssh depending on the key used

I want a git repository, accessible over ssh, to be read-only when used with certain keys. With other keys access to the full system is okay. Here is my solution. git-readonlyshell: ...
1
vote
1answer
70 views

Checking if a git repository needs to be updated

I made a small Vim distribution that uses vundle. I decided to make a small function that checks if the repository must be updated. ...
2
votes
1answer
234 views

Chrome extension that lets you push changes from Chrome Developer Tools directly to GitHub

2 months ago, I wrote a chrome extension called hotfix. I recently went back to look over the code and it made me cringe a bit. I refactored it a little, but before I get knee deep in it, I would like ...
7
votes
1answer
108 views

Coverage processing on multiple Java projects with gmake

As part of my data collection, I have to run multiple kinds of coverage processing on multiple Java projects. Below is my main Makefile intented only for gmake. ...
3
votes
2answers
363 views

Pair programming matrix

At work, we have a "pair programming ladder" where you can keep track of who is pairing with whom (based on check-ins). The idea is to promote "promiscuous pairing" where each developer eventually ...
6
votes
2answers
2k views

Shell script to assist with branch management for tasks in git

I found nvie's git branching model simple enough to grasp and suitable for my projects - but the frontend supplied at GitHub was far too complex for me to understand. Hence, I wrote this script to ...
2
votes
1answer
285 views

Run all scripts in a sub-directory

When git runs my post-receive hook, I'd like it to run all the scripts in the subdirectory ...
3
votes
1answer
132 views

Counting the number of days worked for all commiters to a git repo

I wrote this script to collect evidence of the number of days worked for the purpose of claiming some government tax credits. I'm looking for some ways to clean it up. I'm especially wondering if ...
4
votes
1answer
286 views

NSTask with Git

This is my first real Cocoa app that I am writing. The first version of this app was just one long applescript. So in my app auto git, I have an NSTask instead of Tell terminal. My code looks like ...
2
votes
1answer
216 views

Backup utility for local git repositories

After reading this Stack Overflow question I decided to write a backup utility for local git repositories. The result is on GitHub. I would like this application to be well-behaved with an ...
4
votes
3answers
338 views

Shell script to sync dotfiles repository

I'm doing the git dot files thing and created a script -- my first Unix shell script -- to synchronise the repo dot files with those in the user's home. It checks which dot files exist in the repo ...
3
votes
2answers
665 views

Symlinking git-managed dotfiles into a home directory

As a learning exercise, I decided to write a script for helping me maintain my Unix configuration/dot-files under a git repository. I check out a copy of the repository in my home directory called ...