Tag: linux

How can I manage Linux settings (config) files in different directories in a single Git repo in another directory?

Suppose I have 6 different files on different locations which I want to put under one repo. E.g. I have files like ~/bashrc /etc/php.ini /etc/apache.conf /etc/virtualhosts.conf /scripts/mybackup.sh Now I want to put those in my one repo called My Scripts from one location, so that if I use git status and then if those files […]

How to propagate local branch deletion to remote in 1 step – git, github

When I want to delete a branch locally on git and propagate this to the GitHub repo, I use this 2-step method: ~$ git branch -d [branch_name] ~$ git push origin :[branch_name] Is there any command to delete a branch locally an automatically propagate this modification to the remote repo on GitHub?

Linux kernel configuration – enabling CONFIGURE_LOCALVERSION_AUTO

I have recently git cloned the kernel of Linus Torvalds. I want to build and install this kernel in my laptop. But because I want to use “kernel-of-the-day” I want to enable CONFIGURE_LOCALVERSION_AUTO option. But how should I enable this option I don’t know that. Where to find this option?

How to print latest commit id of kernel code in kernel log?

For some debug purpose i need to print the latest commit id of linux kernel‘s source code in kernel log. So how to do that? I know latest commit id can be known by git rev-parse HEAD but how to print its o/p in linux kernel log. Is there any way so i can invoke […]

File permission issues when developing with Windows / hosting with Unix

I am developing a website on my windows laptop, and I use Git for the version control. When I add my files to Git, they are added under the mode 644. The problem is, on my Linux server, I need the files to be 775. So what I do is, every time I deploy, I […]

Installing git on shared hosting – ./configure: no such file or directory

Im trying to install git on shared hosting – (via SSH, gcc –version returns number) I downloaded the lasted git from GitHub: wget https://github.com/git/git/archive/v1.8.4.2.tar.gz then extracted it to a folder: tar zxvf v1.8.4.2 and navigated to the git folder: cd git-v1.8.4.2. then tried to install it: ./configure prefix=/home/$USER –with-curl –with-expat. the command returned bash: ./cofigure.ac: […]

how to merge git .diff file to source code?

I export one diff file, use ‘git diff HEAD^ HEAD > a.diff‘ . So, I wanna use a.diff file patch to another source code. I use command ‘patch -p0 < a.diff‘, but it not works. said, “can’t find files.” So, my question is: how to path a.diff file to source code? Can someone help me […]

repo for all except some projects not all. is there a repo command to do this?

I have tried googling this but havent found anything relavant to what im looking for. I have a few projects in android that i have rebased to the tip. After doing that I would like to move all the remaining projects to the tip. The below command will checkout all the projects to the tag. […]

git, upload big file in unstable connection?

I try to upload some file to github with git in linux. I have a big file and a unstable connection. upload was interrupted many times. Is there any way to upload these files resumable?

How to check for the presence of a git repository in a directory using bash script

I am trying to work with git on my project. I want to set up the terminal such that whenever I cd into a directory that contains a git project, the terminal should indicate which git branch I am currently on. If there is a git project, the terminal show only the name of the […]

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