Cloning a repository not locally, but in a server - github

Let's say I want to clone a Github repo from somebody but not to my local machine, but to my Github so I can work from the Github website and push changes from there. Is this possible? I seem only to be able to "download" locally whenever I want to clone.

Maybe you can fork the repository first. Then edit the forked repo, and then commit the changes on github directly.

Related

Changing Github Repo Name - Possible Issues?

I have a question about working with Github.
Let's say I have a repo called 'WorkflowRepo' and I've done work on that repo already, but I have some unpushed changes on my local.
I subsequently changed the repo name to 'WorkflowRepoAnalysis' on Github
Will I be able to push these changes without any 'naming conflicts'? Because the repo is called 'WorkflowRepo' on my local but 'WorkflowRepoAnalysis' on Github.
I tested out for the situation that you have mentioned. I was able to push local changes to the remote repo without any naming conflicts. The steps I followed are mentioned below.
Created a repo, let's say name testRepo and initialized with README.
Added changes to README via Github.
Cloned that repo on local machine and made some changes to the README.
Went to Github and renamed the repo to testRepoNameChanged.
Pushed the changed.
I faced no naming conflicts.
Additionally, the git push command does prompt this, but there are no conflicts. The local changes are reflected on remote.
remote: This repository moved. Please use the new location:
remote: https://github.com/username/testRepoNameChanged.git

Update all branches on forked repo with github.com?

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. 🙂

Eclipse Egit: Update a github fork to merge changes of master repo?

I have forked a github repo. Now my worked repo is out of sync with the original repo.
I understand that I need to do a merge, but how to do this with Eclipse git is a bit unclear to me.
Question: How do I update my fork to include changes made to the original repo made by the owner?
Edit 1: I've added another remote. But I don't see any Pull buttons on the context menu:
You do the merge on your local machine and then push the result from your local machine to your own github repo. There is no way to update your github repo directly on the server.
To do that, add that original github repo as a new remote. This is described in the egit user manual. Choose "configure for fetch" instead and give it the URI of the original repo. Afterwards you can simply use the context menu "Pull" on that new remote node to fetch and merge all the new stuff. After finishing the merge, you "Push to upstream", which is your own github repo.
Try the second url under upstream to push your changes. The first one ist just for fetching (see the green/red arrows ;-)

Why does nothing happen when I click fork on github?

I created a repository in github and then issued the following command on my local box:
git push origin master
Now I see all of the files on github.
I would like to start work on making changes. With this in mind I clicked the fork button on the
github screen. However nothing happens. I see a message at the bottom of my browser screen but
that's all.
How do I copy my "forked" version to my local computer?
If you want to work on your GitHub repo, you need to clone it locally.
If you want others to contribute directly in your repo, you need to declare them as collaborator.
You could set up a dedicated branch for them to use.
If you don't want them to push directly to your repo, then your colleagues need to fork your repo, and clone their fork locally.
If it's your repository, there's no need to fork the repo.
If I read your question correctly, to make changes, simply edit the files in question in a text editor, save them, open terminal, change directory to the one with the code, and write git add . then git commit -m "Your commit message" and then git push. The new code should be updated in GitHub as a new commit.

Github: how to checkout my own repository

I am very new to GitHub.
I have created a GitHub repository and pushed it from my computer.
Now I need to work on it from another computer.
How can I checkout my own repository? Should I fork it as for other people's repositories?
It seems to me a bit silly to fork my own repository, though.
On the project page (http://github.com/you/project) there will be a link on the right at the bottom of project tools list with a path to a .git repo
Open a terminal and type:
git clone [link to repo here]
That will create a local clone of the repo you can work on, then if you follow the instructions on GitHub to add a remote server you can push your changes back.
Syncing files back and forwards is just as easy;
Computer A (Had the original git repo)
Computer B (Has the cloned repo)
Make some changes on Computer A, then run
git push origin master
Go to computer B, then run
git pull origin master
To sync your new changes, make some changes on computer B then push back
git push origin master
You don't need to fork it on the site, you can just clone your repository. There are links on your repository's page for cloning it with the SSH, git, or HTTP protocols. (Since it's your own, you probably want the SSH one.)
Information about how to clone a repository will come up very early in any git tutorial, so I'm not sure it's worth adding much more here - you might want to start with the one in Pro Git, for example:
http://progit.org/book/ch2-1.html#cloning_an_existing_repository