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

Add doc for steps to work on fork of project #43

Closed
sachja opened this issue Apr 9, 2015 · 7 comments
Closed

Add doc for steps to work on fork of project #43

sachja opened this issue Apr 9, 2015 · 7 comments

Comments

@sachja
Copy link
Contributor

sachja commented Apr 9, 2015

Based on various blogs the standard procedure to work on a fork of a go project on github seems to be as follows :

  1. Set GOPATH
  2. Install the original repo and its dependencies using git get command. This actually does a git clone for all the src directories so you do not need to do that
    go get -u github.com/contiv/netplugin
  3. Go to the downloaded src directory
    cd $GOPATH/src/github.com/contiv/netplugin
  4. Do git remote add
    git remote add fork <your GitHub fork URL, pasted from the clipboard>
  5. Make your code changes then:
    git push fork

(if instead you wanted to just push changes to contiv repo directly you would skip step 4. Basically there is no need to do git clone either ways as go does that for you).

e.x. see
http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
Or,
https://github.com/limetext/lime/wiki/Forking

If this sounds correct - let me know if I should update/add doc with this info.

@jainvipin
Copy link

@sachja - thanks for digging in.
I am working on contributing.md, perhaps you can add this as part of that.

@sachja
Copy link
Contributor Author

sachja commented Apr 9, 2015

Sure. i will update the dockerhost instructions meanwhile.

@mapuri
Copy link
Contributor

mapuri commented Apr 9, 2015

hmmm, I wanted to avoid having developers do a lot of manual steps, like our build already takes care of downloading dependencies, so step 2 can be avoided. Also running additional git commands to work around Go import path limitation might be a bit intimidating for users new to git and go.

In absence of any standard way and us having to document the steps anyway, would following instructions works:

  • checkout (git clone) your fork at $GOPATH/src/github.com/contiv/ i.e.
cd $GOPATH/src/github.com/contiv/ 
git clone https://github.com/<user>/netplugin
  • Then rest of the steps are regular steps you would do to build, change and commit using standard git and github processes

@sachja
Copy link
Contributor Author

sachja commented Apr 9, 2015

Yes this would also work. Other go projects seem to follow what i sent but i agree it sounds more steps initially (though i used it for my last change and it was smooth).

For your instructions can we add step 1,2 and explicitly say we require to do this due to the GO import stuff. maybe we can also add a link to https://golang.org/doc/code.html#Organization

(I had missed this when i forked. The general reaction is to just start with the clone and then worry about setting gopath and its directories. )

  1. Set GOPATH

  2. mkdir -p $GOPATH/src/github.com/contiv/

  3. your steps ...

@gaurav-dalvi
Copy link
Contributor

@mapuri and @sachja Can we close this issue now ?

@mapuri
Copy link
Contributor

mapuri commented Aug 3, 2016

yes, this is an old issue. Let's open new issue if needed.

@gaurav-dalvi
Copy link
Contributor

Closing it now !

dseevr pushed a commit to dseevr-dev/netplugin that referenced this issue Nov 28, 2017
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