Coder Social home page Coder Social logo

cocoaplayground / gitup Goto Github PK

View Code? Open in Web Editor NEW

This project forked from git-up/gitup

0.0 2.0 0.0 4.13 MB

The Git interface you've been missing all your life has finally arrived.

Home Page: http://gitup.co

License: GNU General Public License v3.0

Objective-C 59.41% C 26.08% Shell 0.30% C++ 14.21%

gitup's Introduction

Build Status

GitUp

Work quickly, safely, and without headaches. The Git interface you've been missing all your life has finally arrived.

Git recently celebrated its 10 years anniversary, but most engineers are still confused by its intricacy (3 of the top 5 questions of all time on Stack Overflow are Git related). Since Git turns even simple actions into mystifying commands (“git add” to stage versus “git reset HEAD” to unstage anyone?), it’s no surprise users waste time, get frustrated, distract the rest of their team for help, or worse, screw up their repo!

GitUp is a bet to invent a new Git interaction model that lets engineers work quickly, safely, and without headaches. It's unlike any other Git client out there from the way it’s built (it interacts directly with the Git database on disk), to the way it works (you manipulate the repository graph instead of manipulating commits).

With GitUp, you get a truly efficient Git client for Mac:

  • A live and interactive repo graph (edit, reorder, fixup, merge commits…),
  • Unlimited undo / redo of almost all operations (even rebases and merges),
  • Time Machine like snapshots for 1-click rollbacks to previous repo states,
  • Features that don’t even exist natively in Git like a visual commit splitter or a unified reflog browser,
  • Instant search across the entire repo including diff contents,
  • A ridiculously fast UI, often faster than the command line.

GitUp was created by @swisspol in late 2014 as a bet to reinvent the way developers interact with Git. After several months of work, it was made available in pre-release early 2015 and reached the top of Hacker News along with being featured by Product Hunt and Daring Fireball. 30,000 lines of code later, GitUp reached 1.0 mid-August 2015 and was released open source as a gift to the developer community.

Getting Started

Learn all about GitUp and download the latest stable release for Mac OS X 10.8+ from http://gitup.co.

Read the docs and visit the community forums for support & feedback.

Releases notes are available at https://github.com/git-up/GitUp/releases. Builds tagged with a v (e.g. v1.2.3) are released on the "Stable" channel, while builds tagged with a b (e.g. b1234) are only released on the "Continuous" channel. You can change the update channel used by GitUp in the app preferences.

To build GitUp yourself, simply run these commands in Terminal:

  1. git clone https://github.com/git-up/GitUp.git
  2. cd GitUp
  3. git submodule update --init --recursive

Then open the GitUp.xcodeproj Xcode project.

GitUp Architecture

GitUp is built as 3 cleanly separated layers communicating only through the use of public APIs:

Foundation Layer (depends on Foundation only)

  • Core/: wrapper around the minimally required functionality of libgit2, on top of which is then implemented all the Git functionality required by GitUp (note that GitUp uses a slightly customized fork of libgit2)
  • Extensions/: categories on the Core classes to add convenience features implemented only using the public APIs

UI Layer (depends on AppKit)

  • Interface/: low-level view classes e.g. GIGraphView to render the GitUp Map view
  • Utilities/: interface utility classes e.g. the base view controller class GIViewController
  • Components/: reusable single-view view controllers e.g. GIDiffContentsViewController to render a diff
  • Views/: high-level reusable multi-views view controllers e.g. GIAdvancedCommitViewController to implement the entire GitUp Advanced Commit view

Application Layer

  • Application/: essentially the "glue code" connecting all the above layers together into an actual app (and therefore not really clean code contrary to the rest of GitUp)

The Foundation and UI layer are for all intents and purposes an SDK, with which it should be quite easy to build other Git tools or even entire apps:

Here's the pseudo-code to display a live-updating GitUp stash view:

GCRepository* repo = [[GCLiveRepository alloc] initWithExistingLocalRepository:<PATH> error:NULL];
GIDiffViewController* vc = [[GIStashListViewController alloc] initWithRepository:repo];
[<WINDOW>.contentView addSubview:vc.view];

Here's the pseudo-code to display a diff view between a commit and its parent:

GCRepository* repo = [[GCLiveRepository alloc] initWithExistingLocalRepository:<PATH> error:NULL];
GCCommit* c1 = [repo findCommitWithSHA1:<SHA1> error:NULL];
GCCommit* c2 = [[repo lookupParentsForCommit:c1 error:NULL] firstObject];  // Follow main line
GIDiffViewController* vc = [[GIDiffViewController alloc] initWithRepository:repo];
[vc setCommit:c1 withParentCommit:c2];
[<WINDOW>.contentView addSubview:vc.view];

Here's the pseudo-code to display a live-updating Advanced Commit view:

GCLiveRepository* repo = [[GCLiveRepository alloc] initWithExistingLocalRepository:<PATH> error:NULL];
GIAdvancedCommitViewController* vc = [[GIAdvancedCommitViewController alloc] initWithRepository:repo];
[<WINDOW>.contentView addSubview:vc.view];

Credits

Also a big thanks to the fine libgit2 contributors without whom GitUp would have never existed!

License

GitUp is copyright 2015 Pierre-Olivier Latour and available under GPL v3 license. See the LICENSE file in the project for more information.

IMPORTANT: GitUp includes some other open-source projects and such projects remain under their own license.

Contributors Welcome - Maintainers Needed

Congratulations, you made it this far! GitUp is a very modern and quite large open source app used by thousands of developers around the world. May we interest you in becoming a contributor (send a PR) or, even better, a maintainer (reach out to [email protected])?

gitup's People

Contributors

swisspol avatar

Watchers

 avatar  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.