Note that git rebase has a different job than git merge (with or without --ff-only). What rebase does is to take existing commits and copy them. Suppose, for instance, that you're on branch1 and have made two commits A and B:

There's a git command that does this diff-and-then-copy-and-commit for you: git cherry-pick. So:

Now you have this:

Now you can switch back to branch1 and delete your original A and B, using git reset (I'll use --hard here, it's more convenient that way as it cleans up the work-tree too):

This removes the original A and B,1 so now you have:

The above illustrates moving commits from one local branch branch1 to another local branch branch2, but git uses the exact same process to move commits when you have a remote-tracking branch that acquires some new commits when you do a git fetch (including the fetch that is the first step of git pull). You might start by working on branch feature, that has an upstream of origin/feature, and make a couple of commits of your own:

But then you decide you should see what has happened upstream, so you run git fetch,2 and, aha, someone upstream wrote a commit C:

At this point you can simply rebase your feature's A and B onto C, giving:

Sometimes there's nothing to rebase, i.e., no work that you yourself did. That is, the graph before the fetch look like this:

If you then git fetch and commit C comes in, though, you're left with your feature branch pointing to the old commit, while origin/feature has moved forward:

If you had your own commits A and B, though, and you asked to merge those with C, git would do a real merge, making a new merge commit M:


...-o--o--A--B   <-- HEAD=branch1
        \
         o--C    <-- branch2


git checkout branch2      # switch HEAD to branch2 (commit C)
git cherry-pick branch1^  # this copies A to A'
git cherry-pick branch1   # and this copies B to B'


...-o--o--A--B         <-- branch1
        \
         o--C--A'-B'   <-- HEAD=branch2


git checkout branch1
git reset --hard HEAD~2


...-o--o               <-- HEAD=branch1
        \
         o--C--A'-B'   <-- branch2


...-o        <-- origin/feature
     \
      A--B   <-- HEAD=feature


...-o--C     <-- origin/feature
     \
      A--B   <-- HEAD=feature


...-o--C     <-- origin/feature
        \
         A'-B'  <-- HEAD=feature


...-o      <-- origin/feature
           `-- HEAD=feature


...-o--C   <-- origin/feature
     `---- <-- HEAD=feature


...-o--C        <-- origin/feature
     \   `-_
      A--B--M   <-- feature

Edit: To be more specific, I mean adding another loopback driver, not replacing the existing one. After copying drivers/net/loopback.c to drivers/net/loopback2.c, apply the following patch (done on top of 3.8):


diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 335db78..cba692f 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_MACVLAN) += macvlan.o
 obj-$(CONFIG_MACVTAP) += macvtap.o
 obj-$(CONFIG_MII) += mii.o
 obj-$(CONFIG_MDIO) += mdio.o
-obj-$(CONFIG_NET) += Space.o loopback.o
+obj-$(CONFIG_NET) += Space.o loopback.o loopback2.o
 obj-$(CONFIG_NETCONSOLE) += netconsole.o
 obj-$(CONFIG_PHYLIB) += phy/
 obj-$(CONFIG_RIONET) += rionet.o
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9ef07d0..ed9d82d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2718,6 +2718,7 @@ static inline bool netif_supports_nofcs(struct net_device *dev)
 }

 extern struct pernet_operations __net_initdata loopback_net_ops;
+extern struct pernet_operations __net_initdata loopback2_net_ops;

 /* Logging, debugging and troubleshooting/diagnostic helpers. */

diff --git a/net/core/dev.c b/net/core/dev.c
index f64e439..7c1cffb 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6834,6 +6834,9 @@ static int __init net_dev_init(void)
        if (register_pernet_device(&loopback_net_ops))
                goto out;

+       if (register_pernet_device(&loopback2_net_ops))
+               goto out;
+
        if (register_pernet_device(&default_device_ops))
                goto out;

Updated minor versions for node8, node10, powershell, and gradle 5


# Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License.
# A copy of the License is located at
#
#    http://aws.amazon.com/asl/
#
# or in the "license" file accompanying this file.
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
# See the License for the specific language governing permissions and limitations under the License.
#

FROM ubuntu:14.04.5

ENV DOCKER_BUCKET="download.docker.com" \
    DOCKER_VERSION="17.09.0-ce" \
    DOCKER_CHANNEL="stable" \
    DOCKER_SHA256="a9e90a73c3cdfbf238f148e1ec0eaff5eb181f92f35bdd938fd7dab18e1c4647" \
    DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \
    DOCKER_COMPOSE_VERSION="1.21.2" \
    GITVERSION_VERSION="3.6.5"

# Install git, SSH, and other utilities
RUN set -ex \
    && echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression \
    && apt-get update \
    && apt install -y apt-transport-https \
    && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
    && echo "deb https://download.mono-project.com/repo/ubuntu stable-trusty main" | tee /etc/apt/sources.list.d/mono-official-stable.list \
    && apt-get update \
    && apt-get install software-properties-common -y --no-install-recommends \
    && apt-add-repository ppa:git-core/ppa \
    && apt-get update \
    && apt-get install git=1:2.* -y --no-install-recommends \
    && git version \
    && apt-get install -y --no-install-recommends openssh-client=1:6.6* \
    && mkdir ~/.ssh \
    && touch ~/.ssh/known_hosts \
    && ssh-keyscan -t rsa,dsa -H github.com >> ~/.ssh/known_hosts \
    && ssh-keyscan -t rsa,dsa -H bitbucket.org >> ~/.ssh/known_hosts \
    && chmod 600 ~/.ssh/known_hosts \
    && apt-get install -y --no-install-recommends \
       wget=1.15-* python=2.7.* python2.7-dev=2.7.* fakeroot=1.20-* ca-certificates \
       tar=1.27.* gzip=1.6-* zip=3.0-* autoconf=2.69-* automake=1:1.14.* \
       bzip2=1.0.* file=1:5.14-* g++=4:4.8.* gcc=4:4.8.* imagemagick=8:6.7.* \
       libbz2-dev=1.0.* libc6-dev=2.19-* libcurl4-openssl-dev=7.35.* libdb-dev=1:5.3.* \
       libevent-dev=2.0.* libffi-dev=3.1~* libgeoip-dev=1.6.* libglib2.0-dev=2.40.* \
       libjpeg-dev=8c-* libkrb5-dev=1.12+* liblzma-dev=5.1.* \
       libmagickcore-dev=8:6.7.* libmagickwand-dev=8:6.7.* libmysqlclient-dev=5.5.* \
       libncurses5-dev=5.9+* libpng12-dev=1.2.* libpq-dev=9.3.* libreadline-dev=6.3-* \
       libsqlite3-dev=3.8.* libssl-dev=1.0.* libtool=2.4.* libwebp-dev=0.4.* \
       libxml2-dev=2.9.* libxslt1-dev=1.1.* libyaml-dev=0.1.* make=3.81-* \
       patch=2.7.* xz-utils=5.1.* zlib1g-dev=1:1.2.* unzip=6.0-* curl=7.35.* \
       e2fsprogs=1.42.* iptables=1.4.* xfsprogs=3.1.* xz-utils=5.1.* \
       mono-devel less=458-* groff=1.22.* liberror-perl=0.17-* \
       asciidoc=8.6.* build-essential=11.* bzr=2.6.* cvs=2:1.12.* cvsps=2.1-* docbook-xml=4.5-* docbook-xsl=1.78.* dpkg-dev=1.17.* \
       libdbd-sqlite3-perl=1.40-* libdbi-perl=1.630-* libdpkg-perl=1.17.* libhttp-date-perl=6.02-* \
       libio-pty-perl=1:1.08-* libserf-1-1=1.3.* libsvn-perl=1.8.* libsvn1=1.8.* libtcl8.6=8.6.* libtimedate-perl=2.3000-* \
       libunistring0=0.9.* libxml2-utils=2.9.* libyaml-perl=0.84-* python-bzrlib=2.6.* python-configobj=4.7.* \
       sgml-base=1.26+* sgml-data=2.0.* subversion=1.8.* tcl=8.6.* tcl8.6=8.6.* xml-core=0.13+* xmlto=0.0.* xsltproc=1.1.* \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get clean

# Download and set up GitVersion
RUN set -ex \
    && wget "https://github.com/GitTools/GitVersion/releases/download/v${GITVERSION_VERSION}/GitVersion_${GITVERSION_VERSION}.zip" -O /tmp/GitVersion_${GITVERSION_VERSION}.zip \
    && mkdir -p /usr/local/GitVersion_${GITVERSION_VERSION} \
    && unzip /tmp/GitVersion_${GITVERSION_VERSION}.zip -d /usr/local/GitVersion_${GITVERSION_VERSION} \
    && rm /tmp/GitVersion_${GITVERSION_VERSION}.zip \
    && echo "mono /usr/local/GitVersion_${GITVERSION_VERSION}/GitVersion.exe \$@" >> /usr/local/bin/gitversion \
    && chmod +x /usr/local/bin/gitversion

# Install Docker
RUN set -ex \
    && curl -fSL "https://${DOCKER_BUCKET}/linux/static/${DOCKER_CHANNEL}/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \
    && echo "${DOCKER_SHA256} *docker.tgz" | sha256sum -c - \
    && tar --extract --file docker.tgz --strip-components 1  --directory /usr/local/bin/ \
    && rm docker.tgz \
    && docker -v \
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
    && addgroup dockremap \
    && useradd -g dockremap dockremap \
    && echo 'dockremap:165536:65536' >> /etc/subuid \
    && echo 'dockremap:165536:65536' >> /etc/subgid \
    && wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind \
    && curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose \
    && chmod +x /usr/local/bin/dind /usr/local/bin/docker-compose \
# Ensure docker-compose works
    && docker-compose version

# Install dependencies by all python images equivalent to buildpack-deps:jessie
# on the public repos.

RUN set -ex \
    && wget "https://bootstrap.pypa.io/2.6/get-pip.py" -O /tmp/get-pip.py \
    && python /tmp/get-pip.py \
    && pip install awscli==1.* \
    && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*

VOLUME /var/lib/docker

COPY dockerd-entrypoint.sh /usr/local/bin/

ENV NODE_VERSION="10.1.0"

# gpg keys listed at https://github.com/nodejs/node#release-team
RUN set -ex \
    && for key in \
      94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
      B9AE9905FFD7803F25714661B63B535A4C206CA9 \
      77984A986EBC2AA786BC0F66B01FBB92821C587A \
      56730D5401028683275BD23C23EFEFE93C4CFFFE \
      71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \
      FD3A5288F042B6850C66B31F09FE44734EB7990E \
      8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
      C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
      DD8F2338BAE7501E3DD5AC78C273792F7D83545D \
      9554F04D7259F04124DE6B476D5A82AC7E37093B \
      93C7E9E91B49E432C2F75674B0A78B0A6C481CF6 \
      114F43EE0176B71C7BC219DD50A3051F888C628D \
      7937DFD2AB06298B2293C3187D33FF9D0246406D \
    ; do \
      gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
      gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
      gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
    done

RUN set -ex \
    && wget "https://nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" -O node-v$NODE_VERSION-linux-x64.tar.gz \
    && wget "https://nodejs.org/download/release/v$NODE_VERSION/SHASUMS256.txt.asc" -O SHASUMS256.txt.asc \
    && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
    && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt | sha256sum -c - \
        && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \
        && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc SHASUMS256.txt \
        && ln -s /usr/local/bin/node /usr/local/bin/nodejs \
        && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN npm set unsafe-perm true

CMD [ "node" ]

Recommend

Scrapy grab div with multiple classes?

Java indexOf(int) returns 0

Multiple MySQL rows with one form

Subset Data in R excluding 13

Prolog rules structure and its difference

Extjs 5, data model association & load nested data

start google navigation and go back to my app android

Comparing uint64_t with an unsigned char*

Error while loading image on device (swift)

Pass an instance of a class deriving from a base class into a function

C, 'fork: resource temporarily unavailable' on TCP server

Cannot assign value to a variable - Javascript

set styles for checkboxes in Symfony2?

Kendo Grid custom command button shown dynamically

pdfbox and itext extracting image with incorrect dpi

Command timeouts in Julia

SQL: How do I find which movie genre a user watched the most? (IMDb personal project)

Not able to place two div's next to each other, tried everything

VHDL Signal Assignment Confusion

A bit confused with factor-bundle and grunt-browserify

Assign values to dictionary by order they were added

GCC - Missing braces around initializer

i implemented a custom comparator to sort my ArrayList, but listview is still not sorted

javascript array format via for loop

Concat a string to clipboard in android

calling functions without objects or passing values

Node.js and lodash - clone JSON object returning only specific element

get polygon properties when a marker is placed on it

have a script that runs when a specified disk s unmounted in Linux?

For some reason or the other my gridview is stuck in one position and my Textview. I am using android studio

Yii2: Registering Asset Bundle vs registering external Js file

get a user-input string as an array of individual characters?

adding class in multi path with Angular

Turn off webcam/camera after using getUserMedia

Create an array of random numbers in Swift

Trigger with a RAISERROR and ELSE case issue

Change the identifier line name to random shortened name in fasta file

Scroll to different id(s) from one button

animate multiple things at once?

Use string as Class Association Name Rails

Cloudant java non-latin characters

convert given html string to normal string android?

Working with the characters backslash and curly brackets in regular expressions in Python

Django folder structure

Get parent layout from custom Adapter

Retrieve Firebase parent from .push

Gulp TypeError: Arguments to path.join must be strings

Repetition of number up to limit, then loop it

need correct .htaccess configuration

Two set of Int32 - fastest way to count the intersection

Accessing $scope variable from another method in the same controller Angularjs

Inspect URL and download Image

$@ bash arguments are not escaped

Kendo DataSource .slice and template issues

Cypher Optional Match

Xpath expression not working in Scrapy

Parse SignUpCallback() method error

Create a Json Object from an ajax returned Json Object

R count number of specific string in data frame

directive element not showing

Can I configure Vim to go to the end of particular file?

Generic Structures in C

get the Name Box name of an Excel cell?

Mysql: Multiple Self Join?

When does recursive binary search terminate if the sought value is absent

Form button not responding and badly aligned [Refactoring Ruby on Rails]

Catch form submit not working

Shown doesn't work

Javascript show and hide function

Javascript countdown timer with multiple use

VBA - merge set number of rows in first column

Excel VBA using Range returned from Function

Passing an ifstream variable between members of the same object, C++

INSERT only if both colomns are not duplicate

Nesting the result of regular expression

Xamarin : Inheriting from AlertDialog class

angularjs infinite digest errors when looping through a list

Nav Bar Item in XIB that Presents a StoryBoard Tab Bar Root View Controller Segue

the current opinion on using tags to hide individual instances of a recurring itemtype= http://schema.org/Event

get RecyclerView's child from integer value?

get device imei number in non-activity class?

Why has my program stopped working?

Python: Validating earlier in the code

Animation steps and event data

fill empty linked list from another linked list in c language

Angular - How to use an attribute's value in a custom directive?

Java Swing JTable TableModel setValueAt() not called when window closed

Pull data from a PHP object

Imitate pressing keyboard F-keys using a Perl script

Can't figure out how to remove text-decoration on

include php file checking error?

Lotus Notes View unable to show all the values in separate view

display an image using Pillow?

Remove duplicate from php array (not array_unique)

Section Names In Table Views

debug your Nest queries?

Python 3: Local Variable referenced before assignment

topViewController error (iOS7 - works on iOS8)

Regular Expression, 4th parameter

My virtualenv is not taking into account ? [apache, mod_wsgi and django]