Tag: linux

How to remove all existing git files so that i can renew my own repository without getting fatal error?

I have a git clone of a C project, and on that i have my own customized modules, after final modification, i want to make my own stable repository as backup in to github. So when i try to add as below, it fails, because in the child directory there are many .git or .gitignore […]

How to deal with multiple Linux user files in Git

I have a Git project that it’s a bit special because the files in the tree are generated by two different users. Example: # ls -la drwxr-xr-x 13 ivan ivan 4096 2012-02-02 16:52 . drwxrwxrwx 32 root root 4096 2012-01-28 21:37 .. drwxr-xr-x 2 ivan ivan 4096 2012-02-07 20:41 system drwxr-xr-x 2 ivan ivan 4096 […]

prevent git checkout from overwriting a file

Another dev checked his .rvmrc into the git repo. I’ve since removed it and added it to gitignore, but every time in need to go back in time it overwrites my .rvmrc. I’m on OSX, so I’ve discovered I can use the OSX file locking mechanism (“Locked” checkbox in Get Info) to stop this happening […]

How to have a Local Install have Precedence Over a System Wide Install?

I have a shell account on a Linux server (running Ubuntu 8.04) with user level permissions (but no root priveleges). The system has Git 1.5.x installed. I wish to run a more current version of git. I can compile from source and install in my home directory but would like the git commands to invoke […]

Upload repository on compiled

I’m just wondering if there is a way (Linux / Unix) to update a Github repository when a particular file has compiled successfully? So for example, I have a repository called ‘Work’ and if I compiled the file main.cpp and if it compiles successfully it automatically synchronises the file / repository on Github. I hope […]

How does this complicated shell command (containing |, && and sed) work?

I’m trying to figure out how to work git filter-branch and I need help with some basic Linux scripting commands. ‘git ls-files -s | sed “s-\t-&newsubdir/-” | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index –index-info && mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE’ HEAD Can anyone break this down for me and explain each part? I’m most interested in the ‘|’ notation, […]

Portable gcc executable?

So I’m trying to break a few rules quietly. GoDaddy doesn’t seem too keen on letting me have Git, and for some reason think that one needs root access to run any gcc (crazy web-hosting support teams). As I try to convince them to do what I tell them to, I’m trying to find a […]

How to see changelogs for a particular module in kernel

I want to know how to see the changelogs or commit messages for a module in the kernel. Actually i modified virtio_net in kernel2.6.26. Now the virtio_net in 2.6.34 seems to be lot different from the one in 2.6.26. There should be some git commit messages or changelogs for the different versions of virtio_net. I […]

Remove Oldest File in Repository

I’ve got a git repo, and I have revisions of a file, dated with a unix timestamp. I want to get the oldest file (I.E. the one with the smallest timestamp) and remove it. Is this possible with Bash alone and if so, how?

How to access user's ssh keys from the program that is run with sudo?

The dilemma: a Linux program that I’m working on should: Fetch a “package” over git+ssh:// protocol (using Git). Install that “package” in the system. For git+ssh to work, Git needs to see my keys. For the “package” installation, the program must have superuser privileges. A limitation: the program should not elevate privileges (call sudo) by […]

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