Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify where the repository is #3

Open
kennethormandy opened this issue Sep 20, 2015 · 6 comments
Open

Clarify where the repository is #3

kennethormandy opened this issue Sep 20, 2015 · 6 comments

Comments

@kennethormandy
Copy link

Hey, this really glad this plugin is being worked on, I’ve wanted something like it for a while.

I think I’m confused about where the repository that’s created is, though. I already have my type projects as git repos, so I was expecting any subsequent commits to become part of that history. There don’t seem to be any changes happening though.

When I look at the revision history, the commits I made using this plugin are there, so I think the repository this plugin uses are the one I actually aren’t the same?

If you can offer any help with this, or clarify if the plugin should be committing to the .git repository in the same directory the .glyphs file is, that would help a lot. Thanks!

@simoncozens
Copy link
Owner

Huh. It should use a repository in the same directory as the .glyphs file. If it doesn't find one there, it creates one:

            p = Glyphs.font.filepath
            os.chdir(os.path.dirname(p))
            if not os.path.isdir("./git"):
                self._runGit(["init"])

Try, in the Macros window, doing print os.path.dirname(Glyphs.font.filepath) and seeing what you get.

@juandelperal
Copy link

Simon, It would be great to check the parent folder. Something like:

 if not os.path.isdir("./git") or not os.path.isdir("../git"):
    self._runGit(["init"])

@davelab6
Copy link

davelab6 commented Jun 5, 2017

@simoncozens I had a few people today run into this, where the parent dir would be great to detect and use :) Maybe @m4rc1e can provide a PR to fix this; if so would you accept it? :)

@juandelperal
Copy link

Also, I think this works only in the master branch, it would be great to maintain the current branch :)

 self._runGit(["checkout", "master"])

@m4rc1e
Copy link

m4rc1e commented Jun 6, 2017

I also wrote my own git script for glyphs... I never use it.

I think it's best practice to do the git stuff yourself. By doing it yourself, you can also add other files which may have changed at the same time as the .glyphs file, thus grouping things better.

@kennethormandy
Copy link
Author

I haven’t used it extensively yet, but Commit Glyphs is definitely worth trying for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants