Skip to content

Instantly share code, notes, and snippets.

View RuthNjeri's full-sized avatar
🌴

Ruth RuthNjeri

🌴
  • Nairobi
View GitHub Profile

Merge conflicts

Happens when working on a team project when two/more developers have edited the same file.
Therefore, face the conflict courageously.

Assumption: current_branch(local branch) conflicts with a base branch called base-branch

Solving a merge conflict by rebasing

  1. git pull origin --rebase base-branch. If your local base-branch is upto date with origin, you can just do git rebase base-branch If merge conflicts persist:
  2. Fix merge conflicts by accepting either current changes, incoming changes or Accept both changes. Remember to cosult when fixing conflicts because you might end up removing crucial code.
@RuthNjeri
RuthNjeri / gist:1c3b086af560e9f68dda
Created February 11, 2016 11:41 — forked from scmx/upgrade-install-ruby-2-1-2-ubuntu-12-04.md
Upgrade/Install ruby 2.1.2 #ubuntu #12.04 #14.04
# Reference http://stackoverflow.com/a/18490935/2037928
# Login as root
# Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
# Download appropriate ruby version https://www.ruby-lang.org/en/downloads/