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

Git and Github contributions #373

Open
IanTrudel opened this issue Oct 1, 2017 · 49 comments
Open

Git and Github contributions #373

IanTrudel opened this issue Oct 1, 2017 · 49 comments

Comments

@IanTrudel
Copy link
Collaborator

We shall openly talk about our grievances with Git and Github in order to find a common ground to efficiently contribute to Shoes without burdening other members.

I would like to recommend we come up with a series of instructions for common tasks including contributing from branches and forks. The instructions should at least include git commands but possibly also through Github web interface. These instructions will be placed on our wiki for all contributors to see.

Nothing fancy. Just something like a mindless step-by-step would do. We do the mind stuff in here.

@ccoupe
Copy link

ccoupe commented Oct 2, 2017

I think the first problem to fix is that the shoes3/shoes3 repo is tied to the shoes/shoes repo. I can't remember if I forked it or cloned it but github/git should be told it's not tied to the dead shoes. Fixing that may involve other forks (@backorder, @passenger94)

Here is an example of the situation/solution for creating pull requests from a fork to the forked. Not exactly our setup but close enough gain some knowledge. I'm going to very cautious because no body wants to loose a repo or a fork.

@IanTrudel
Copy link
Collaborator Author

Shoes3 is a fork of Shoes repo as it should be.

image

I think the first problem to fix is that the shoes3/shoes3 repo is tied to the shoes/shoes repo.

You mentioned this problem on a number of occasions through the years. Looking at Shoes repo doesn't show anything on my side. Perhaps you could take screenshots or something? Working on Shoes3 repo is obviously not supposed to affect Shoes repo.

@IanTrudel
Copy link
Collaborator Author

Why do we need Shoes3 repo in the first place? Can't we ask the guys from Shoes4 to let us merge back into Shoes repo? It's kinda silly to split the community in such a way and it sends a confusing message to people. One guy had a pull request that will be entirely ignored on shoes/shoes-deprecated/pull/283. Clearly he doesn't know about Shoes3 repo.

@ccoupe
Copy link

ccoupe commented Oct 2, 2017

I believe the reason I created Shoes3 was that I didn't want to sort though the hundreds of commits different between my home box and the Shoes repo. I was not git savvy, remember? I did discuss my work with the Shoes folks (now Shoes4) and one volunteered to merge all the stacked up commits but that didn't happen. I'm sure the Shoes4 folks will let us use Shoes repo but we'd still have to deal with those all commits and modify our forks - dangerous, not fun, not much to gain. I wonder if there is way to 'close'' the Shoe repo from future commits and new issues? Or a redirect to Shoes3.

@ccoupe
Copy link

ccoupe commented Oct 2, 2017

UPDATED
Lets have @backorder do an experiment - creating a remote branch . You got a 'resizable' branch on your fork. We want it to appear on Shoes3.
git checkout resizable
edit one of the files - add a comment or something and commit.
git push -u origin resizable

Then we'll see where it shows up.

reference:
https://stackoverflow.com/questions/2765421/how-do-i-push-a-new-local-branch-to-a-remote-git-repository-and-track-it-too

@ccoupe
Copy link

ccoupe commented Oct 3, 2017

@backorder - I update the previous post to use the proper branch name.

@ccoupe
Copy link

ccoupe commented Oct 3, 2017

Half finished wiki page.

@ccoupe
Copy link

ccoupe commented Oct 6, 2017

I see that I simplified past the hard part, @backorder . You have a remote tracking branch of 'resizable' on your repo - the goal is to push your `resizable branch to shoes3/shoes3 as a branch there.

This write up suggests you have to change your 'upstream`. If your 'upstream' was pointed to the old shoes/shoes that would fit with some of the symptoms I see. Sadly, the article assumes you're going to use a browser to create the pull request. But, let's test it before we get deeper in the weeds. Let's find out where your 'upstream' points to. How to find that out? I don't know but it's the first thing to check.

This Big Book of Git article is written from the users repository perspective (that would be you). Lot's of hints. I can see how I can pull your branch but that just puts the burden on me to do all the work.

@ccoupe
Copy link

ccoupe commented Oct 6, 2017

Aha! - git remote show upstream shows I'm still connected to shoes/shoes which means you probably are too. I don't have the courage to change my upstream yet but now have a clue.

@IanTrudel
Copy link
Collaborator Author

It seems that I don't have this problem. There is in fact no upstream. Do you have a specific directory structure that would include shoes3 as a subdirectory of shoes or something?

git remote show upstream
fatal: 'upstream' does not appear to be a git repository
fatal: Impossible de lire le dépôt distant.

Veuillez vérifier que vous avez les droits d'accès
et que le dépôt existe.

@ccoupe
Copy link

ccoupe commented Oct 6, 2017

Interesting. git remote show origin lists a lot of info. I did a git clone into a test directory and like you it does not have a upstream. I'm going to experiment with that clone directory later but I suspect it really just needs the upstream set to the proper value.

@IanTrudel
Copy link
Collaborator Author

I don't know if you still want me to merge resizable branch or wait a little but, in any case, here is the output of git remote show origin on both Shoes3 and my repo.

On Shoes3 repo:

git remote show origin  
* distante origin
  URL de rapatriement : https://github.com/Shoes3/shoes3.git
  URL push : https://github.com/Shoes3/shoes3.git
  Branche HEAD : master
  Branches distantes :
    curl       suivi
    federales  suivi
    master     suivi
    rb23       suivi
    typeddata2 suivi
    widgetfont suivi
  Branche locale configurée pour 'git pull' :
    master fusionne avec la distante master
  Référence locale configurée pour 'git push' :
    master pousse vers master (le local n'est pas à jour)

On my repo:

git remote show origin
* distante origin
  URL de rapatriement : https://github.com/BackOrder/shoes3.git
  URL push : https://github.com/BackOrder/shoes3.git
  Branche HEAD : master
  Branches distantes :
    federales    suivi
    graph        suivi
    master       suivi
    refactoring  suivi
    resizable    suivi
    rubyside     suivi
    sdb          suivi
    svg          suivi
    text_shape   suivi
    typeddata2   suivi
    video_vlc    suivi
    win-terminal suivi
  Branches locales configurées pour 'git pull' :
    master    fusionne avec la distante master
    resizable fusionne avec la distante resizable
  Références locales configurées pour 'git push' :
    master    pousse vers master    (à jour)
    resizable pousse vers resizable (à jour)

@ccoupe
Copy link

ccoupe commented Oct 6, 2017

You have two different Shoes repos on your machine? Your shoes3 clearly points to github.com/Shoes3/shoes3.git , yet your resizable work was done on github/backorder/shoes3.git. The first one Shoes3 looks like a clone - just a guess.

Which one (or both) don't have an upstream (get remote show upstream)?

@ccoupe
Copy link

ccoupe commented Oct 6, 2017

Let's just do something and see what happens. In the repo dir with resizable,

git remote add upstream https://github.com/Shoes3/shoes3.git
git checkout resizable
git push upstream resizable 

This should, in theory push the branch from you local files to my github repo - assuming there are no permissions issues. It may complain that you should not be in branch resizable. If so git checkout master and redo the git push upstream resizable.

@ccoupe
Copy link

ccoupe commented Oct 7, 2017

This describes how to create a pull request from the cmd line from your repo to your upstream so you'll need to set that upstream. The url in the example would be be your https://githbub.com/backorder/shoes3.

You can also go to your website and push the pull request button - a little more confusing. Once again, it needs the upstream to be set for your repo.

@IanTrudel
Copy link
Collaborator Author

You have two different Shoes repos on your machine?

Actually, a few of them. Is that a problem? I suppose it would be better to switch to local branches but it's so much work compared to move around directories.

The following duplicated my resizable branch onto Shoes3. A newly resizable branch can be found here.

git remote add upstream https://github.com/Shoes3/shoes3.git
git checkout resizable
git push upstream resizable 

Not sure what to do here? You committed something in the mean time and it would need some merging. It seems that is what we would want in the first place (rather than duplicating the branch to master).

git request-pull resizable https://github.com/BackOrder/shoes3 master    
The following changes since commit 381051c0b7781b51ddcd8a374ab509460f8fe36e:

  Merge pull request #1 from Shoes3/master (2017-09-30 14:08:36 -0400)

are available in the git repository at:

  https://github.com/BackOrder/shoes3 master

for you to fetch changes up to 381051c0b7781b51ddcd8a374ab509460f8fe36e:

  Merge pull request #1 from Shoes3/master (2017-09-30 14:08:36 -0400)

----------------------------------------------------------------

You can also go to your website and push the pull request button - a little more confusing. Once again, it needs the upstream to be set for your repo.

It is relatively straightforward with the website but we should gain from learning proper git command line. We are both able to use it but not overly comfortable with it.

@ccoupe
Copy link

ccoupe commented Oct 7, 2017

Success I have the branch! Thank You! Yes, I did a commit to master for a different experiment so your master is out of sync. I believe you you can do git pull upstream master to synchronize, but you might lose those old branches like 'svg'. That will probably free up your suspended pull request - which probably isn't needed now. One of the challenges with github is my repo is 'special' - I get to do things the easy way and you can't.

I think git request-pull is the better method and we can do some harmless experiments. For example I was thinking of creating a 'monitors' branch for working on the multiple monitors scheme. - How about you create that branch on your repo (github/backorder) and local. Remove/add some spaces to README.md line 1, commit and see if you can create a pull request.

@IanTrudel
Copy link
Collaborator Author

Hmmm. Something is strange. I merged conflicts (accept all though), request-pull again and Shoes3 sees the commit but did not create a pull request.

image

@ccoupe
Copy link

ccoupe commented Oct 7, 2017

Because, there is nothing to do. The first attempt git push upstream resizable worked so another pull request for that has nothing to add. We are fine.

@IanTrudel
Copy link
Collaborator Author

OK!

@jasonrclark
Copy link
Member

Hey all! I'm one of the folks working on Shoes 4 and found this issue when looking around related to shoes/shoes4#713.

Currently, I've renamed the old https://github.com/shoes/shoes to shoes/shoes-deprecated to give more indication that it's not active. (Made some README updates too). There isn't a "lock this repo entirely", but we could shut off issues on the repo to discourage folks from reporting things where they won't be heeded... would lose that history, but don't know if that's much loss when none of us are looking at it?

I totally get why it'd be a pain to merge back from shoes3/shoes3 after so long, but how would you feel about moving the shoes3 repo (and any others?) to the shoes org? Happy to get you all the same permissions etc. that you've currently got, and then shoes 3 and 4 can live happily in closer proximity to one another.

All my experience points to GitHub properly redirecting when pushing/pulling against remotes where the repo has been renamed/moved, so folks who've cloned would be fine with this move. What do you think?

@IanTrudel
Copy link
Collaborator Author

Hi @jasonrclark !

Right now Shoes community and resources are fragmented. We are all missing out on potential contributions and sharing code on Shoes 3 and Shoes 4. The issue tracker on the official Shoes repo sometimes goes unnoticed for months and we may lose newcomers in the process. it would be a good thing to merge Shoes 3 back into Shoes.

There are some way to move issues using https://github-issue-mover.appspot.com/ but it's not working in batches. A little cumbersome.

My understanding of the Shoes 4 issue you mentioned is that you guys want to move Shoes/Shoes4 to Shoes/Shoes. It could be acceptable though we need some plan to see where and how Shoes 3 would fit in Shoes/*.

I also think we should have closer collaboration with Shoes 4 team. We should be able to share more code, ensure better compatibility, etc. For example, code samples are not always shared back and forth, and Backporting Shoes 4 RSpec (#79) would ensure both version of Shoes comply to the same expectations.

@ccoupe
Copy link

ccoupe commented Nov 3, 2017

@jasonrclark - there was a time when I felt owner role was necessary for some reason. I believe it was (is?) required in order to transfer repos. Other than that possible problem, I'm ok moving shoes3/shoes3.git and some of related Shoes3repos back to the home shoes/ (owner role is a pain since its so rarely used).

@ccoupe
Copy link

ccoupe commented Nov 4, 2017

According to this
I just need the ability to create repos at https://github.com/shoes/

@jasonrclark
Copy link
Member

@backorder Although that issue started by proposing shoes4 renaming to shoes, because there's no shared history at all in git I'm actually in favor of us just ending up with shoes/shoes3 and shoes/shoes4.

Thanks for pointer to the issue mover. Since the issues back on old shoes/shoes are most apt to be of value to shoes/shoes3, I'm happy to let the folks more involved with Shoes 3 decide whether to triage those over, shut them down, or just leave them like they are.

@ccoupe I've tweaked the settings in the Shoes org to allow for member creation of repos, which by that doc should be enough to let you move things over. Happy to bump you to owner and/or set other permissions if you want 'em too.

So happy to see Shoes getting back together!

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

I tried transfering shoes3 to shoes and got this message:
shoes already has a repository in the shoes/shoes-deprecated network

Git never forgets, does it?

@jasonrclark
Copy link
Member

jasonrclark commented Nov 5, 2017

Ha, well GitHub doesn't at least. Given that GH tracks the repo moves fine, I can make a new "retirement" org and shuffle shoes/shoes over there, which would hopefully clear the way for shoes3 to rejoin shoes. That sound reasonable @ccoupe?

@IanTrudel
Copy link
Collaborator Author

image

Renaming a repo doesn't break the link. We are supposed to merge.

@jasonrclark
Copy link
Member

Right, but GitHub's complaining because we're trying to put two repos from the same "network" in an org together. If we move shoes/shoes-deprecated out of the org, then that should clear the way for a shoes-forked repo (shoes3) to move in there.

100% agree that GH's intended flow would be merging, but seems like there's reluctance to do the fussing, and friction around issue migration (since shoes3 has the issues we want, and that'd be making old shoes's the home for it, so everything we want to keep from shoes3 would have to get moved).

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

I need to do an 'unfork' of shoes3.git which maybe best done by the github support folks according to net wisdom. @jasonrclark moving shoes.git to another org, May work.

@jasonrclark
Copy link
Member

Up to you @ccoupe if you'd rather I try the move, or if you'd rather contact support first. Happy either way on my end.

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

While moving shoes.git to another org would provide us with some information (breaking my upstream) using support would provide some more interesting information. Can you rename shoes-deprecated back to shoes.? Then I'll work with github support.

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

@jasonrclark Sorry - don't rename it that break what you've done.

@jasonrclark
Copy link
Member

@ccoupe Actually, when I've done renames at work, any name that the repo has had before seems to continue to be supported--even when they go through a chain of renames. Nothing particular broken for me if you do want me to rename, but just let me know either way.

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

I sent this to support:

I forked a repo,  https://github.com/shoes/shoes-deprecated a few years ago to create https://github.com/Shoes3/shoes3 The folks at https://github.com/shoes would like me to move my repo back into their org as https://github.com/shoes/shoes3 . We can't find the secret sauce to do that. My fork has been forked so I want move them too.There are other redirects involved so were are cautiou.    Any help would be appreciated.

Thank you
--Cecil

@ccoupe
Copy link

ccoupe commented Nov 5, 2017

It's been transferred! Pretty fast response from github support for a Sunday. I need to fix up somethings on my local .git/config but I expected that.

@IanTrudel
Copy link
Collaborator Author

Wow, awesome! This was so fast. :)

@jasonrclark
Copy link
Member

Awesome! Welcome Shoes friends! 👞 👟 👠

@ccoupe
Copy link

ccoupe commented Nov 7, 2017

I seem to lack permissions to write/push to shoes3.git. If I push via my command line I get

ERROR: Permission to shoes/shoes3.git denied to ccoupe.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If I attempt to edit a file at github I get

You’re editing a file in a project you don’t have write access to. Submitting a change to this file will write it to a new branch in your fork ccoupe/shoes3, so you can send a pull request. 

@jasonrclark
Copy link
Member

Tweaked settings so the Shoes team in org which I believe you are in @ccoupe should be able to write.

@ccoupe
Copy link

ccoupe commented Nov 7, 2017

Yes, it's working now. Thank you @jasonrclark I need to add a couple of people from the old site, can I do that or do you have issue invites?

@jasonrclark
Copy link
Member

Cool. If you want I can give you admin rights and you could add folks @ccoupe. Otherwise if you let me know the handles I’ll add em tonight.

@ccoupe
Copy link

ccoupe commented Nov 7, 2017

if you need an unskilled in git backup admin, I can volunteer, somewhat reluctantly. The missing shoes3 folks are @dredknight , @kingdonb, @passenger94 - the latter two may not accept the invite so that would be good to know.

@jasonrclark
Copy link
Member

Since there's a couple of us with admin around and you don't seem too keen, I've just invited those three along @ccoupe. Feel free to ask if at any point you do want to be able to manage things and/or if other folks ought to be added.

@dredknight
Copy link
Contributor

Hey everyone,
What I can be helpful with :).

@jasonrclark
Copy link
Member

So just as soon as you set a course... GitHub releases a feature that makes it even better! They now support making repos read-only aka "archived".

I've made that setting change over on shoes/shoes-deprecated. I guess we could let that get renamed back to shoes/shoes as the README points elsewhere, and no one can add more issues and stuff there we don't want... or could just leave the repo name explicitly calling out it's deprecation.

Anyone got opinions there?

@ccoupe
Copy link

ccoupe commented Nov 9, 2017

I'd leave it alone unless evidence pops up. A R/O shoes-deprecated should be fine.

@IanTrudel
Copy link
Collaborator Author

One of the perks from moving back to Shoes repo is that we can now search through Shoes3 code using the search box on top of Github website. Something that forks cannot do. Enjoy!

@dredknight
Copy link
Contributor

Btw have in mind that github has a project tab that we can use for larger shoes projects (for example - profiler, graphs, performance releases?) that we can use to bind different single issues to.

It will be nice feature to use especially if issue count grows larger.

Actually we can move the facebook/git discussions there as they do not fit into the issues list.

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

4 participants