EzDevInfo.com

github

Ruby interface to github API v3 Unicorn • A place for open source creatures

How can I determine the url that a local git repo was originally cloned from?

I pulled a project from github a few days ago. I've since discovered that there are several forks on github, and I neglected to note which one I took originally. How can I determine which of those forks I pulled?


Source: (StackOverflow)

Git push requires username and password

I cloned a git repository from my Github account to my PC.

I want to work with both my PC and laptop, but with one Github account.

When I try to push to or pull from Github using my PC, it requires username and password, but not when using the laptop!

I don't want to type my username and password every time I interact with origin. What I am missing here?


Source: (StackOverflow)

Advertisements

Download a single folder or directory from a GitHub repo

How can I download only a specific folder or directory from a remote Git repo hosted on GitHub?

Say the example GitHub repo lives here:

git@github.com:foobar/Test.git

Its directory structure:

Test/
    foo/ 
       a.py
       b.py
    bar/
       c.py
       d.py

I want to download only the foo folder and not clone the whole Test project.


Source: (StackOverflow)

Merging between forks in GitHub

I forked a GitHub repository. Then I pushed some changes to my fork. Then the original repository merged my changes and some others. Now, I want to merge those changes I'm missing. I tried a simple pull followed by push, but this yield my commits in duplicate. What's the best way to do it?


Source: (StackOverflow)

Is there a way to skip password typing when using https:// github

I recently switched to syncing my repos to https:// in github (due to firewall issues) and it asks for a password every time. It used to be that I had an ssh cert and it was enough. Is there a way to bypass password in my case (using http/https)?


Source: (StackOverflow)

How can I remove a commit on GitHub?

I "accidentally" pushed a commit to GitHub.

Is it possible to remove this commit?

I want to revert my GitHub repository as it was before this commit.


Source: (StackOverflow)

How to update GitHub forked repository?

I recently forked a project and applied several fixes. I then created a pull request which was then accepted.

A few days later another change was made by another contributor. So my fork doesn't contain that change... How can I get that change into my fork?

Do I need to delete and re-create my fork when I have further changes to contribute? or is there an update button?


Source: (StackOverflow)

Should Gemfile.lock be included in .gitignore?

I'm sort of new to bundler and the files it generates. I have a copy of a git repo from github that is being contributed to by many people so I was surprised to find that bundler created a file that didn't exist in the repo and wasn't in the .gitignore list.

Since I have forked it, I know adding it to the repo won't break anything for the main repo, but if I do a pull request, will it cause a problem?

Should Gemfile.lock be included in the repository?


Source: (StackOverflow)

How do I rename a repository on GitHub?

I wanted to rename one of my repositories on GitHub, but I got scared when a big red warning said:

  1. We will not set up any redirects from the old location
  2. You will need to update your local repositories to point to the new location
  3. Renaming may take a few minutes to complete

Does anyone have step-by-step instructions on how to accomplish #1 and #2 manually? Or what do I have to do locally?


Source: (StackOverflow)

How to install gem from GitHub source?

I would like to install gem from the latest GitHub source.

How do I do this?


Source: (StackOverflow)

Github: what is the difference between README and README.md?

I've noticed some projects have not only a README file, but also a README.md

What is the difference between these 2 files? I know README serves also as introductory text in the project repository page. But I have no idea what README.md does.


Source: (StackOverflow)

Remote origin already exists on git push to new repository

I have my project on GitHub at some location git@github.com:myname/oldrep.git.

Now I want to push all my code to a new repository at some other location git@github.com:newname/newrep.git.

I used the command:

git remote add origin git@github.com:myname/oldrep.git

but I am receiving this:

fatal: remote origin already exists.


Source: (StackOverflow)

Pull new updates from original Github repository into forked Github repository

I forked someone's repository on Github and would like to update my version with commits and updates made in the original repo. These were made after I forked my copy.

How can I pull in the changes that were made in the origin and incorporate them into my repo?


Source: (StackOverflow)

Git keeps prompting me for password

I've been using Git for a while now, but the constant requests for a password are starting to drive me up the wall.

I'm using OSX and Github, and I set up Git and my SSH keys as instructed by GitHub's Set Up Git page . I've also added the github SSH key to my Mac OSX keychain, as mentioned on GitHub's SSH key passphrases page . My public key is registered with Git.

Nevertheless, every time I try to git pull, I have to enter my username and password. Is there something other than an SSH key that I need to set up for this?


Source: (StackOverflow)

How to remove a directory in my GitHub repository?

I have 2 directories on my GitHub repository. I'd like to delete one of them. How could I do that without deleting and re-creating entire repository?


Source: (StackOverflow)