Giter Club home page Giter Club logo

Comments (12)

celroid avatar celroid commented on July 1, 2024 14

Installation instructions for Windows would be helpful.

from git-filter-repo.

newren avatar newren commented on July 1, 2024 2

Yup, I'll try to get these in place this week, as well as figure out the GitHub method for handling releases since this program isn't being included in git.git. Anyway, the short version is:

  • Install git-filter-repo anywhere in $PATH, or in the directory that git --exec-path reports. (I'd probably pick the git --exec-path route, but don't know if others would frown on writing to a git-specific directory.) This is enough to get command line usage of the tool working. (There's technically a "@@LOCALEDIR@@" in the script you could replace for internationalization, but since python already provide a fallback and no one has provided any translations anyway, I'm not sure it's worth the effort. That was part of an effort to make it git-filter-repo include-able in git.git, but it appears folks want to shrink git.git down to a small core rather than go the batteries-included route.)
  • Create a symlink named git_filter_repo.py to /usr/lib/git-core/git-filter-repo (or wherever you end up sticking git-filter-repo) in your $PYTHONPATH. E.g. /usr/bin/python-3.5/git_filter_repo.py. This is needed if anyone wants to use filter-repo as a library from a python script as per contrib/filter-repo-demos.
  • You can either build docs by copying Documentation/git-filter-repo.txt into a clone of git.git in the Documentation/ subdirectory and doing a docs build, or you can cheat and copy them out of the 'docs' branch of the repo. E.g. "git show docs:man1/git-filter-repo.1 >/usr/share/man/man1/git-filter-repo.1". The docs branch also has a html/git-filter-repo.html that could be of interest.

Let me know if you run into any problems.

from git-filter-repo.

newren avatar newren commented on July 1, 2024 1

There is now an INSTALL file at the top of the repo with instructions.

from git-filter-repo.

kunom avatar kunom commented on July 1, 2024 1

@celroid To be able to run git filter-repo -h from a standard command line on Windows 10 1903 with git-filter-repo installed via pip, I had to

  • Manually add the Python interpreter location and the scripts folder to the path.
set path=%path%;C:\Users\YOURLOGIN\AppData\Local\Programs\Python\Python38
set path=%path%;C:\Users\YOURLOGIN\AppData\Local\Programs\Python\Python38\Scripts
  • Deactivate the installation-on-demand handling for Python.exe and Python3.exe under Start > Manage app execution Aliases

from git-filter-repo.

nomennescio avatar nomennescio commented on July 1, 2024

I noticed that it requires at least Git 2.22 (2019 Aug), so this is probable not useable for me for some time until that version has propagated throughout all distributions. Back to filter-branch for the time being.

from git-filter-repo.

newren avatar newren commented on July 1, 2024

Yep, I've been sending several fast-export and fast-import patches upstream that are needed for filter-repo, and so a fairly recent version of git is needed. A quick clarification, though: Git 2.22 was from June, not August. (2.23 was from August, and you only need 2.23 if you pass the --preserve-commit-encoding option.)

from git-filter-repo.

nomennescio avatar nomennescio commented on July 1, 2024

As for 2.22 I was referring to the latest bugfix 2.22.1, which is from August, should have mentioned that.

from git-filter-repo.

swordligit avatar swordligit commented on July 1, 2024

How to auto complete the command? copy the git-filter-repo to git --exec-path,
but cannot use auto completion.

from git-filter-repo.

newren avatar newren commented on July 1, 2024

@swordligit: Isn't bash completion to reduce typing for frequently used commands? Since git-filter-repo is for rewriting history, which should be done sparingly, why would it be frequently used?

Anyway, someone could add the necessary bash or zsh completion rules via some kind of script, much like git did for all its commands. One could depend upon the functions in contrib/completion/git-completion.bash (from git) to help since folks who want filter-repo completion almost certainly are using git completion, but the rules still need to be defined. I'm unlikely to do that myself, as I just don't see the point for a rarely used command.

Also, please note that completion is an entirely separate issue from the existing one, so open a new issue if you want to discuss further.

from git-filter-repo.

swordligit avatar swordligit commented on July 1, 2024

OK,got it, Thanks.
Just confused, before installing the fiter-repo, the filter-branch auto-completion works,
after installed filter-repo, even the filter-branch auto-completion fails, maybe the are
ambiguous.
Anyway, I can add a bash completion.

from git-filter-repo.

stevensrf11 avatar stevensrf11 commented on July 1, 2024

god dam sob gitbass missing about mth fcker git command needed to stuff everything

from git-filter-repo.

stevensrf11 avatar stevensrf11 commented on July 1, 2024

starting to wonder if gitbash is just a pile of trash

from git-filter-repo.

Related Issues (20)

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.