Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git committing and pushing

Tags:

git

github

I'm quite new to Git and I would like to get some advice.

I forked a project project/project.git from github and I have the remote copy repo as myname/project.git. I also have the local copy of this repo on my machine. I made some commits, pushed them to my remote repo, but my question is that how the author will know I made that commits and to pull them into the original project repo? Is there an automatic notification that does this? how should I send him a pull request maybe from command line? thanks

like image 386
Daniel Szisz Avatar asked Sep 06 '26 07:09

Daniel Szisz


2 Answers

You would send the original author a pull request from the GitHub web interface itself, not from your local machine.
See "Send pull requests" on GitHub.

illustration

Note that it is best for you to pull first from the original repo (to make sure you got everything published in said original repo since you forked it), and then, if everything still works (your local modifications + the evolutions from the original repo), push to your fork and make your pull request.
See "What is the difference between origin and upstream in github" for more.

There is nothing "automatic" in that process: you only select the commits you want in your pull request (ie all your new commits are not necessarily part of your pull request).

like image 175
VonC Avatar answered Sep 08 '26 03:09

VonC


Another possibility for the original author is to have a look at the "Fork Queue" every now and then; however, if you want to notify the author yourself, go ahead and create a pull request.

See https://github.com/blog/270-the-fork-queue

The important part, which is done by the author of the original repo, is:

Just to be clear – the suggested workflow for this would be to use the tool to pull in patches from forks into a testing branch and ignore the ones that aren’t ready or don’t apply.
Then you would want to fetch that branch down and test the code before merging or rebasing it into your master branch.

This allows you to do a email patch style workflow without actually having to deal with patches over email or having to add a remote to your local repo every time someone submits something.

However, there is no automatic notification associated with new commits made on those forks, which is probably why the Fork + Pull Model has been put in place.

like image 43
cfedermann Avatar answered Sep 08 '26 01:09

cfedermann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!