Giter Site home page Giter Site logo

git-training-usecases's Introduction

Git Exercises

Use Case: Rebase my branch onto main

I work on a "feature" branch And a colleague of mine did a fix that is on "main" branch I want to "get" my colleague's code on my branch.

BAD: git merge main

Use Case: Redo last commit

I did a commit but I want to add some files to it.

Use Case: Clean a WIP commit

I worked on a feature And I had to quickly change a branch so I performed a "WIP" commit at one point. I want to clean this WIP commit before opening my merge request.

Use Case: Too many commits

I worked on a feature and did too many commits I wish to fuse them together before opening a merge request.

Use Case: Edit a previous commit (not last)

I did two commits: one for backend and then one for frontend But I forgot to add one file in the backend commit

Use Case: Quickly change branch

I am working on a feature and have not yet commited But I need to quickly change branch to fix an urgent issue.

Use Case: Check Stash Without Applying

Use Case: Conflict resolution

Use Case: Accidentally push force

Use Case: Accidental merge from main

I worked on a feature and I wanted to rebase upon main But instead I did a merge

Use Case: Split a commit

I did one big commit that has too many changes I want to split it into two commits

Use Case: Detached Head

I did a wrong checkout And now my HEAD is in "detached" state

Use Case: Branch merged upon itself

Me and a colleague wor

Use Case: Multiple Origins

I forked a repository

git-training-usecases's People

Contributors

sashokbg avatar

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.