[Git] git rebase (reduce merge commit)

In foss, we fork git project from upstream our account and clone to local.

We need to make sure that the respository is up-to-date, so sync to upstream is necessary.

But sometimes when we use git pull which is combined as git fetch and git merge, nonecessary merge occurs.

To avoid redundant merge commit, we  use git pull --rebase instead.

redfish[~] $ git pull --rebase upstream master
redfish[~] $ git push origin master <-f>

<-f> : force updated, that’s because you only rebase the local, but origin doesn’t not rebase.

Reference:

https://git-scm.com/book/zh-tw/v1/Git-%E5%9F%BA%E7%A4%8E-%E8%88%87%E9%81%A0%E7%AB%AF%E5%8D%94%E5%90%8C%E5%B7%A5%E4%BD%9C

Advertisements

[foss] pcmanx compile

redfish [~]$ git clone https://github.com/pcman-ptt/pcmanx
redfish [~]$ sudo apt-get install libgtk2.0-dev
redfish [~]$ sudo apt-get install libglib2.0-dev
redfish [~/pcmanx]$ ./autogen.sh
redfish [~/pcmanx]$ ./configure
redfish [~/pcmanx]$ make
redfish [~/pcmanx]$ sudo make install

The pacmanx binary is in /usr/local/bin/

Reference:
https://code.google.com/archive/p/pcmanx-gtk2/

[Linux] kernel update and remove

Take amd64 as example:

$ cd tmp/
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.6-wily/linux-headers-4.4.6-040406_4.4.6-040406.201603161231_all.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.6-wily/linux-headers-4.4.6-040406-generic_4.4.6-040406.201603161231_amd64.deb
$ wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.6-wily/linux-image-4.4.6-040406-generic_4.4.6-040406.201603161231_amd64.deb

$ sudo dpkg -i *.deb
// Uninstall
$ sudo apt-get remove 'linux-headers-4.4.6*' 'linux-image-4.4.6*'
// Remove old kernels
$ sudo apt-get autoremove --purge
$ sudo purge-old-kernels

[GNU] Update Make Version

There’re some situation that you need to update your Make version to 4.0 or later.
Try this in terminal:

cd /tmp
wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
tar xvf make-4.1.tar.gz

./configure
make
sudo make install
rm -rf make-4.1.tar.gz make-4.1

You can make it your default make by prefixing /usr/local/bin
to your $PATH variable in your shell startup file