I'm somewhat new to Git. I tried to google but couldn't find a clear answer. So here's the issue.
I have a forked repo from another repo
Original repo: https://github.com/org/original
Forked repo: https://github.com/user/original
And then let's say original repo master branch gets updated with new changes.
Now forked repo is not up to date.
How can I sync my forked repo with the original repo most recent state?
I would like to know this given that.
Scenario1: I have not done any changes to my forked repo.
Scenario2: I have done some changes to my forked repo.
Your feedback is highly appreciated. I'm sure a lot of new Git users will have the same question and I couldn't find a straightforward answer to this.
Related
So, my friend made a repository, made me a collaborator, I branched out, forked and then cloned into my IDE.
Everything went fine with that, did some small changes and then wanted to test commit and push.
Commits and push went to my friends repo, everything is fine there, but they are not showing on my fork.
I'm doing it this way (hope it's not the wrong way) to practice these kind of things and I would like to have that project on my profile after I'm done.
Thanks.
Quoting from Github's docs:
"A fork is a copy of a repository.."
A fork essentially creates a separate repo. If you were committing and pushing to your friend's repo, your forked copy has no idea about it unless you push them to your repo also, or merge your friend's repo into your fork.
Ideally, you should never push to the original repo (your friend's repo) at all. Commit and push to your own repo by changing the remote, and when you want your commits to reflect in the original, you should raise a Pull request (assuming you're using GitHub).
You cloned it into your IDE, so you are editing his repo directly. No longer forking.
I've forked a repo, and checkout a new branch, modified and rebased it on the upstream/master. I want to create a pull request now, and I couldnt see the new branch I have created. Could it be on a different remote? Is there a way to see this?
Thanks
I have a forked repo. The original repo has been updated and I need to pull in these changes. I would prefere to use github.com for this rather than the command line if possible.
From the github.com page of my fork I have a button called Compare which allows me to compare my branches with the branches in the original repo, and merge if there are changes. This should do what I want except that the changes I need to update are in a new branch that isn't in my repo.
IMHO, the best way to do this is by installing the Pull app in GitHub.
After forking a repository, you can then enable the app for the
repository, and then configure the app for the forked repository. 🙂
am under the impression that to keep my fork of an open source project update-to-date, i must find some way to merge any upstream changes into my GitHub fork of that project, THEN clone them down onto my local syatem to do the next branch, etc.
Can anyone pls tell me how to keep my GitHub fork in-synch with the upstream project? The info. i find just leaves me baffled as how to do that.
Thanx
Use git pull if you did git clone. It is worthwhile working through the guide https://help.github.com/articles/set-up-git/ and basic intro: http://www.git-scm.com/book/en/v1/Getting-Started.
So i have the following problem:
Back when i started programming, i FORKED a repository (using github for windows) for a browser-game. For some time now, i made stuff, did git commit and issued a pull request using the webpage.
The original author did authorize my pull request and my changes went live.
Recently, i have become an "official" author on the original repository.
So i dont want to work on my "fork" any longer but instead dev on the original.
Using github for windows, i decided to "clone" the original repo.
My github now shows my forked (AncientSion/FieryVoid) repository and the original (Aatu/FieryVoid).
Now what i would like to do is somehow "merge" my forked repo into my local clone of the original repo and from there commit to the master repo directly, that way deploying my local, not yet commited changes from my fork to the live version while at the same time getting rid of fork repository.
However, i have no idea if that works and if it does, how.
Can someone please advise ?
I don't think that the Github for Windows interface supports this, but this can definitely be done via the git bash console. This is untested, but the steps ought to be correct, since I've done something similar (identical, in fact) before. This assumes that your clone, AncientSion/FieryVoid, is up-to-date with Aatu/FieryVoid, which can be done with a pull followed by a merge, or, to avoid merge commits, with a git pull --rebase. So now you have AncientSion/FieryVoid and Aatu/FieryVoid, both present locally, with AncientSion/FieryVoid ahead of Aatu/FieryVoid by a few commits. What you need to do is pull in those commits into Aatu/FieryVoid by running the following:
cd path/to/local/clone/of/Aatu/FieryVoid
git remote add local_pull path/to/local/clone/of/AncientSion/FieryVoid
git pull local_pull master
git push origin master
Couple of assumptions:
You were working on the master branch of AncientSion/FieryVoid. If not, replace master in line 3 with your branch name.
origin is a remote that tracks the online repo Aatu/FieryVoid