Git Product home page Git Product logo

swigit's Introduction

These are just my git scripts that I've come up with over the years to make things easier and to remind me how to do stuff that I'm always forgetting.

It's old, so some of this might have been already added to git core, let me know.

The ones I use frequently:

git up

git-simpull is my usual method of pulling from origin – I have it symlinked as git up.

It does a stash, then a pull --rebase, then a stash pop (if everything goes well).

If the rebase fails, you still have to handle it yourself. I'd like to add some kind of intelligence to be able to run this again to clean up after itself, but for now, you can use git recon to continue the rebase and apply the stash.

git list

This is a compact form of git log that I prefer because it doesn't take over my whole terminal window with a bunch of irrelevant stuff.

You can do

git list 30

to show 30 commits if you need a longer list, and

git list brunch

to list the brunch branch, or some other rev.

I make a .mailmap file for each of my repos that abbreviates all the contributors names to a standand number of characters, 4 or 5 (using nbsp  as padding). This keeps the output of git-list nice and columnar.

git enstage

I alias this as git a and use it instead of add. I got tired of adding each file individually and following up with git status to check my work, so git a adds all of its arguments with the --all option and then does a git status.

git timewarp

Did you forget to commit yesterday and want your git record to show when you actually did this work?

git timewarp 15 hours ago

will make a commit with a modified timestamp. Magic.

swigit's People

Contributors

mckeed avatar

Watchers

 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.