Giter Site home page Giter Site logo

grebase2's Introduction

Background

  • I'm not an expert on git
  • I've used SVN, BZR and GIT (and CVS once).
  • Used SVN for all my personal files since 2005
  • Been using GIT since 2011 for everything
  • I prefer rebase to merge due to cleaner history and more control over the outcome of conflicts.
  • I prefer rebase since it puts the onus on the developer to make sure the main branch is in a good state.
code .
git init
git add README.md
git add index.js
git add .tool-versions
git commit -m "first commit"
git remote add origin [email protected]:StefanWallin/grebase.git
git push -u origin main
open https://github.com/StefanWallin/grebase
git checkout -b emoji

Edit 1: (emoji)

console.log("Violets are 🔴,")
console.log("Roses are 🔵,")
git add -p
git commit -m "Use emojis for colors"
git push -u origin emoji
  • Make PR
  • Do not merge PR
git checkout main

Edit 2: (main)

console.log("Roses are red,")
console.log("Violets are blue,")
git add -p
git commit -m "Correct the poem"
git push
  • open PR again - see conflict
  • LET'S REBASE! 🎉
git pull
git checkout emoji
git rebase -i main
  talk about the file
  talk about EDITOR
  pick
  :wq
  • git status
  • git status -sb
  • Source tree
  • Edit 3: (emoji)
  • Resolve conflict
  • Save file
  • git add index.js
  • git rebase --continue
  • REBASE DONE 🍾
  • git push
  • Try sync button in VS Code
  • Try push button in Source Tree
  • 🤦‍♂️ 😱
  • git push --force-with-lease vs git push --force
  • git checkout -b emoji2
  • git push -u origin emoji2
  • git checkout emoji
  • git push --force-with-lease
  • Kolla PR igen

Edit 4: (hooja) git checkout HEAD^ git commit -m

console.log("Lingon är röda,")
console.log("Älgen är blå,")
console.log("Du gillar brännvin,")
console.log("Fyfan då är vi två")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.