A simple version control system built on top of Git

Gitless

PyPI version Homebrew Formula

Travis Build Status AppVeyor Build Status

Gitless is a version control system built on top of Git, that is easy to learn and use:

  • Simple commit workflow

    Track or untrack files to control what changes to commit. Changes to tracked files are committed by default, but you can easily customize the set of files to commit using flags

  • Independent branches

    Branches in Gitless include your working changes, so you can switch between branches without having to worry about conflicting uncommitted changes

  • Friendly command-line interface

    Gitless commands will give you good feedback and help you figure out what to do next

  • Compatible with Git

    Because Gitless is implemented on top of Git, you can always fall back on Git. And your coworkers you share a repo with need never know that you're not a Git aficionado. Moreover, you can use Gitless with GitHub or with any Git hosting service

Install

Installing Gitless won't interfere with your Git installation in any way. You can keep using Git and switch between Git and Gitless seamlessly.

We currently require Git (1.7.12+) to be installed, but this requirement is going to disappear soon once we finish with our migration to pygit2.

Binary release (macOS and Linux only)

Binary releases for macOS and Linux are available from the Gitless website.

If you've downloaded a binary release of Gitless everything is contained in the gl binary, so to install simply do:

$ cp path-to-downloaded-gl-binary /usr/local/bin/gl

You can put the binary in other locations as well, just be sure to update your PATH.

If for some reason this doesn't work (maybe you are running an old version of your OS?), try one of the other options (installing from source or via the Python Package Index).

Installing from source

To install from source you need to have Python 3.7+ installed.

Additionally, you need to install pygit2.

Then, download the source code tarball and do:

$ ./setup.py install

Installing via the Python Package Index

If you are a Python fan you might find it easier to install Gitless via the Python Package Index. To do this, you need to have Python 3.7+ installed.

Additionally, you need to install pygit2.

Then, just do:

$ pip install gitless

Installing via Homebrew (macOS only)

If you are using Homebrew, a package manager for macOS, you can install Gitless with:

brew update
brew install gitless

Installing via Snapcraft (Linux only)

If you are using Snapcraft, a package manager for Linux, you can install the most recent release of Gitless with:

snap install --channel=beta gitless

You can also use the edge channel to install the most recent build.

Installing via the Arch User Repository (Arch Linux only)

If you are using Arch Linux or any of its derivatives, you can use your favorite AUR Helper and install:

  • gitless for the latest released version
  • gitless-git to build the latest version straight from this repo

Documentation

gl -h, gl subcmd -h or check our documentation

Contribute

If you find a bug, create an issue in our GitHub repository. If you'd like to contribute code, here are some useful things to know:

  • To install gitless for development, install pygit2, clone the repo, cd to the repo root and do ./setup.py develop. This will install the gl command with a symlink to your source files. You can make changes to your code and run gl to test them.

  • We follow, to some extent, the Google Python Style Guide. Before submitting code, take a few seconds to look at the style guide and the Gitless code so that your edits are consistent with the codebase.

  • Finally, if you don't want Travis to be mad at you, check that tests pass in Python 3.7+. Tests can be run with:

    python -m unittest discover gitless/tests
    
Owner
Gitless
A simple version control system built on top of Git
Gitless
Comments
  • AttributeError: 'NoneType' object has no attribute 'remote_name'

    AttributeError: 'NoneType' object has no attribute 'remote_name'

    After cloning our repository in a new location, and successfully running the "gl remote -c" command to point to the remote repository, I am unable to view a history of any branch in the remote repository nor am I able to fuse to it. I see the error message below:

    gl history -l 10 -c -b origin/master ✘ Some internal error occurred ➜ If you want to help, see http://gitless.com for info on how to report bugs and include the following information:

    0.8.8

    Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/gitless/cli/gl.py", line 99, in main return SUCCESS if args.func(args, repo) else ERRORS_FOUND File "/usr/lib/python3.6/site-packages/gitless/cli/gl_history.py", line 36, in main b = helpers.get_branch(args.b, repo) if args.b else repo.current_branch File "/usr/lib/python3.6/site-packages/gitless/cli/helpers.py", line 23, in get_branch return _get_ref("branch", branch_name, repo) File "/usr/lib/python3.6/site-packages/gitless/cli/helpers.py", line 47, in get_ref r = getattr(remote_repo, "lookup" + ref_type)(remote_ref) File "/usr/lib/python3.6/site-packages/gitless/core.py", line 499, in lookup_branch return RemoteBranch(git_branch, self.gl_repo) File "/usr/lib/python3.6/site-packages/gitless/core.py", line 586, in init self.remote_name = self.git_branch.remote_name AttributeError: 'NoneType' object has no attribute 'remote_name'

    Output of pip upgrade of gitless from 0.8.6 to 0.8.8: Installing collected packages: pygit2, gitless Found existing installation: pygit2 0.26.4 Uninstalling pygit2-0.26.4: Successfully uninstalled pygit2-0.26.4 Found existing installation: gitless 0.8.6 Uninstalling gitless-0.8.6: Successfully uninstalled gitless-0.8.6 Successfully installed gitless-0.8.8 pygit2-0.28.2

    Machine information:

    uname -a Linux XXXXXXX 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


    OS Information:

    cat /etc/*release CentOS Linux release 7.4.1708 (Core) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"

    CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"

    CentOS Linux release 7.4.1708 (Core) CentOS Linux release 7.4.1708 (Core)

    Do you have any ideas what caused this error or how to resolve it?

  • Pip install fails

    Pip install fails

    Collecting gitless Downloading gitless-0.8.3.tar.gz Collecting pygit2==0.23.0 (from gitless) Downloading pygit2-0.23.0.tar.gz (453kB) 100% |████████████████████████████████| 460kB 627kB/s Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/pygit2.egg-info writing requirements to pip-egg-info/pygit2.egg-info/requires.txt writing pip-egg-info/pygit2.egg-info/PKG-INFO writing top-level names to pip-egg-info/pygit2.egg-info/top_level.txt writing dependency_links to pip-egg-info/pygit2.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/pygit2.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found

    pygit2/__pycache__/pygit2_cffi_a5f264a5xe8494016.c:208:10: fatal error: 'git2.h' file not found
    #include <git2.h>
             ^
    1 error generated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/tmp/pip-build-E5tTzm/pygit2/setup.py", line 197, in <module>
        cmdclass=cmdclass)
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 195, in run
        self.find_sources()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 222, in find_sources
        mm.run()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 306, in run
        self.add_defaults()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 335, in add_defaults
        sdist.add_defaults(self)
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/sdist.py", line 120, in add_defaults
        build_py = self.get_finalized_command('build_py')
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
        cmd_obj.ensure_finalized()
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/usr/local/lib/python2.7/site-packages/setuptools/command/build_py.py", line 33, in finalize_options
        orig.build_py.finalize_options(self)
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_py.py", line 46, in finalize_options
        ('force', 'force'))
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
        src_cmd_obj.ensure_finalized()
      File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
        self.finalize_options()
      File "/private/tmp/pip-build-E5tTzm/pygit2/setup.py", line 103, in finalize_options
        ffi, C = get_ffi()
      File "pygit2/_utils.py", line 107, in get_ffi
        include_dirs=[libgit2_include], library_dirs=[libgit2_lib])
      File "/usr/local/lib/python2.7/site-packages/cffi/api.py", line 433, in verify
        lib = self.verifier.load_library()
      File "/usr/local/lib/python2.7/site-packages/cffi/verifier.py", line 113, in load_library
        self._compile_module()
      File "/usr/local/lib/python2.7/site-packages/cffi/verifier.py", line 210, in _compile_module
        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
      File "/usr/local/lib/python2.7/site-packages/cffi/ffiplatform.py", line 29, in compile
        outputfilename = _build(tmpdir, ext, compiler_verbose)
      File "/usr/local/lib/python2.7/site-packages/cffi/ffiplatform.py", line 62, in _build
        raise VerificationError('%s: %s' % (e.__class__.__name__, e))
    cffi.ffiplatform.VerificationError: CompileError: command 'clang' failed with exit status 1
    
  • gl status and gl branch unicode errors

    gl status and gl branch unicode errors

    Hi, I'm using the gl-v0.8.3-darwin-x86_64 bin from the main website. Using gl status and gl branch results in the following error:

    Traceback (most recent call last): File "", line 14, in File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.cli.gl", line 80, in main File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.cli.pprint", line 80, in err File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.cli.pprint", line 40, in puts File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/clint.textui.colored", line 52, in func_help UnicodeEncodeError: 'ascii' codec can't encode character u'\u2718' in position 0: ordinal not in range(128)

    Perhaps I missed something in the installation? Just moved the downloaded bin to my /usr/local/bin.

  • Stop following symlinks 216

    Stop following symlinks 216

    Add a check for symlinks when we check if a path is a directory and treat the symlink as a normal file. Gitless will NOT follow the symlinks, because it could pull in the .git/ directory, files outside of the repository or, in the worst case, the entire filesystem. This follows the behavior of git. Git will commit symlinks into the repository and recreate the links on filesystems that support it when the file is downloaded.

  • gl status on OS X fails with installed gl-v0.8-darwin-x86_64.tar

    gl status on OS X fails with installed gl-v0.8-darwin-x86_64.tar

    $ gl status On branch master, repo-directory //gltest ✘ Some internal error occurred ➜ If you want to help, see http://gitless.com for info on how to report bugs and include the following information:

    0.8

    Traceback (most recent call last): File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.cli.gl", line 69, in main File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.cli.gl_status", line 44, in main File "/Users/santiago/Documents/code/gitless/build/gl/out00-PYZ.pyz/gitless.core", line 561, in status OSError: Failed to open directory '/Users/stefan/Library/Saved Application State/com.bitrock.appinstaller.savedState/': Permission denied

  • Add --move-ignored / -mi flag to

    Add --move-ignored / -mi flag to "gl switch".

    Helps with #20, and potentially #134 by adding a -mi / --move-ignored flag to gl switch.

    Tested on a repo with ~1GB of ignored files. gl switch -mi <branch> takes less than 10 seconds.

  • Homebrew v0.8.7 upgrade issue

    Homebrew v0.8.7 upgrade issue

    Relates to https://github.com/Homebrew/homebrew-core/pull/40297 Also relates to https://github.com/Homebrew/homebrew-core/pull/40376

    Currently, gitless relies on [email protected] which is not supported in homebrew-core anymore.

    It was suggested in this comment that the compatibility with libgit 0.28 should be fixed in the upstream repo.

  • switch does not honor .gitignore

    switch does not honor .gitignore

    When switching branches, gitless does not honor .gitignore and will stash ignored files and directories. This is true of the .gitignore file itself. Each branch will have it's own version of .gitignore. Is this a 'feature' or an issue? Should ignored entries not be ignored? This seems counterintuitive.

  • gl init not working

    gl init not working

    I have just installed gitless from homewbrew (macOS latest version).

    When I run gl -h in an empty repository, I get the corresponding output. But when I run gl init, I get fatal: Not a git repository (or any of the parent directories): .git.

    Am I doing something wrong or is this a bug?

    Thank you!

  • gl track .gitignore  (or any file starting with .git) fails with a complaint about paths

    gl track .gitignore (or any file starting with .git) fails with a complaint about paths

    'gl track' is failing to work on any file prefixed with .git. This is for 0.8.6, on OS X. Examples:

    $ gl track .gitignore 
    ✘ path /Users/jhbrown/demo/.gitignore is absolute but should be relative to the repo root
    
    $ gl track .gitx
    ✘ path /Users/jhbrown/demo/.gitx is absolute but should be relative to the repo root
    
    $ gl track .xgitignore
    ✔ File .xgitignore is now a tracked file
    
    $ gl --version
    GL Version: 0.8.6
    You can check if there's a new version of Gitless available at http://gitless.com
    
    $ uname -a
    Darwin montrose.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
    
  • Better documentation on how to start a new branch off another branch

    Better documentation on how to start a new branch off another branch

    This could be down to me not being able to find the this in the manual, but here is my problem...

    By experiment I have found out that I can do:

    gl branch -c new-branch -dp origin/some-branch
    gl switch new-branch
    gl branch -su origin/some-branch
    

    And then we are in business!

    If this is already in the documentation please direct me to it. If not, please tell me how I can submit PRs on the gitless.com documentation.

    My first attempt at fixing a branch went through git show-ref branch-name to get the commit hasd and then do a gl branch -sh commit. Not a pleasant experience...

  • how to diff two branches

    how to diff two branches

    It seems that gl diff only accepts files as arguments. So to diff two branches, I have to move HEAD back and forth?

    gl switch b
    gl branch -sh a
    gl diff
    gl branch -sh 2b5ec99 
    

    If I do not want to memorize or copy-paste the revision hash, I need to create a branch as a bookmark, then delete it afterwards.

    gl switch b
    gl switch -c tmp
    gl branch -sh a
    gl diff
    gl branch -sh tmp
    gl branch -d tmp
    
  • ui: info about untracked files should only display if untracked files exist.

    ui: info about untracked files should only display if untracked files exist.

    since the info texts are in list format one thinks for a moment there's a untracked files. Then on almost the same indentation there' the textual info There are no untracked files to list.

    $ gl status 
    On branch master, repo-directory //
    
    Tracked files with modifications:
      ➜ these will be automatically considered for commit
      ➜ use gl untrack f if you don't want to track changes to file f
      ➜ if file f was committed before, use gl checkout f to discard local changes
    
        roles/check_mk-pfsense/tasks/main.yml
    
    
    Untracked files:
      ➜ these won't be considered for commit
      ➜ use gl track f if you want to track changes to file f
    
        There are no untracked files to list
    

    I don't know which is the best approach to display here.

    • it might be useful that the info is further indented than the data.
    • it itches that in the positive case there's just a list without prefix or comments, but in the negative case we have a human readable repetetion of the section header. I would trim it to 'No untracked files' or 'No such files' or just 'None'
  • Is this project abandoned?

    Is this project abandoned?

    Last commit to master was almost a year ago. Last release was almost 2 years ago.

    From a python package standpoint, being two years stale makes it hard to continue to maintain this package in package repositories.

  • gl diff: not working with diff-so-fancy or delta

    gl diff: not working with diff-so-fancy or delta

    Hi. I use diff-so-fancy as my core.pager while diff (core.pager=diff-so-fancy | less --tabs=4 -RFX).

    $ gl diff
    Diff-so-fancy: https://github.com/so-fancy/diff-so-fancy
    Version      : 1.3.0
    
    Usage:
    
    git diff --color | diff-so-fancy         # Use d-s-f on one diff
    cat diff.txt | diff-so-fancy             # Use d-s-f on a diff/patch file
    diff -u one.txt two.txt | diff-so-fancy  # Use d-s-f on unified diff output
    
    diff-so-fancy --colors                   # View the commands to set the recommended colors
    diff-so-fancy --set-defaults             # Configure git-diff to use diff-so-fancy and suggested colors
    
    # Configure git to use d-s-f for *all* diff operations
    git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
    ✘ Call to pager diff-so-fancy | less --tabs=4 -RFX failed
    

    Do you see any possibility to get that work?

    Regards, Simpel

  • gl commit -p: quiting with 'q' opens editor with commit message

    gl commit -p: quiting with 'q' opens editor with commit message

    Hi. When I gl commit -p and then recognize I don't want to commit I abort that process with q. But then my editor with the commit message is opened.

    As a side effect I can then type a commit message and close the editor, what will send an 'empty' commit with 0 additions and 0 deletions.

    Regards Simpel

git-cola: The highly caffeinated Git GUI

git-cola: The highly caffeinated Git GUI git-cola is a powerful Git GUI with a slick and intuitive user interface. Copyright (C) 2007-2020, David Agu

Sep 19, 2022
ViewVC is a browser interface for CVS and Subversion version control repositories.

ViewVC - Version Control Browser Interface ViewVC is a browser interface for CVS and Subversion version control repositories. It generates templatized

Sep 11, 2022
docker run klaus / pip install klaus — the first Git web viewer that Just Works™.
docker run klaus / pip install klaus — the first Git web viewer that Just Works™.

klaus: a simple, easy-to-set-up Git web viewer that Just Works™. (If it doesn't Just Work for you, please file a bug.) Super easy to set up -- no conf

Sep 18, 2022
Patchwork is a web-based patch tracking system designed to facilitate the contribution and management of contributions to an open-source project.

Patchwork Patchwork is a patch tracking system for community-based projects. It is intended to make the patch management process easier for both the p

Sep 26, 2022
Trac is an enhanced wiki and issue tracking system for software development projects (mirror)

About Trac Trac is a minimalistic web-based software project management and bug/issue tracking system. It provides an interface to the Git and Subvers

Sep 10, 2022
Tiny Git is a simplified version of Git with only the basic functionalities to gain better understanding of git internals.

Tiny Git is a simplified version of Git with only the basic functionalities to gain better understanding of git internals. Implemented Functi

Oct 15, 2021
gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Sep 16, 2022
🦉Data Version Control | Git for Data & Models
🦉Data Version Control | Git for Data & Models

Website • Docs • Blog • Twitter • Chat (Community & Support) • Tutorial • Mailing List Data Version Control or DVC is an open-source tool for data sci

Sep 23, 2022
🦉Data Version Control | Git for Data & Models
🦉Data Version Control | Git for Data & Models

Website • Docs • Blog • Twitter • Chat (Community & Support) • Tutorial • Mailing List Data Version Control or DVC is an open-source tool for data sci

Sep 21, 2022
Let's Git - Version Control & Open Source Homework

Let's Git - Version Control & Open Source Homework Welcome to this homework for our MOOC: Let's Git! We hope you will learn a lot and have fun working

Dec 5, 2021
One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

AwesomeVersion One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind

Jun 24, 2022
This Repository is an up-to-date version of Harvard nlp's Legacy code and a Refactoring of the jupyter notebook version as a shell script version.
This Repository is an up-to-date version of Harvard nlp's Legacy code and a Refactoring of the jupyter notebook version as a shell script version.

This Repository is an up-to-date version of Harvard nlp's Legacy code and a Refactoring of the jupyter notebook version as a shell script version.

Aug 20, 2022
Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems.
Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems.

Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems. Packer supports Python ?? , C ?? and C++ ?? libraries.

Sep 15, 2022
Scrap-mtg-top-8 - A top 8 mtg scraper using python

Scrap-mtg-top-8 - A top 8 mtg scraper using python

Jan 24, 2022
Spotify Top Lists - get the current top lists of a user from the Spotify API and display them in a Flask app
Spotify Top Lists - get the current top lists of a user from the Spotify API and display them in a Flask app

Spotify Top Lists This is a simple script that will get the current top lists of a user from the Spotify API and display them in a Flask app. Requirem

Jan 30, 2022
Get charts, top artists and top songs WITHOUT LastFM API

LastFM Get charts, top artists and top songs WITHOUT LastFM API Usage Get stats (charts) We provide many filters and options to customize. Geo filter

Feb 11, 2022
Movies-chart - A CLI app gets the top 250 movies of all time from imdb.com and the top 100 movies from rottentomatoes.com
Movies-chart - A CLI app gets the top 250 movies of all time from imdb.com and the top 100 movies from rottentomatoes.com

movies-chart This CLI app gets the top 250 movies of all time from imdb.com and

Feb 17, 2022
Catware - A powerful grabber with a built in bot control system

catware A powerful grabber with a built in bot control system PLEASE NOTE THAT I

Feb 4, 2022
Sep 23, 2022
Git Plan - a better workflow for git
Git Plan - a better workflow for git

git plan A better workflow for git. Git plan inverts the git workflow so that you can write your commit message first, before you start writing code.

Aug 13, 2022