Questions tagged [github]

GitHub is a web-based hosting service for software development projects that use Git for version control. Use this tag for questions specific to problems with repositories hosted on GitHub, features specific to GitHub, and using GitHub for collaborating with other users. Do not use this tag for Git-related issues simply because a repository happens to be hosted on GitHub.

Filter by
Sorted by
Tagged with
5459 votes
26 answers
4.6m views

How to determine the URL that a local Git repository was originally cloned from

I pulled a project with several forks on GitHub, but forgot which fork it was. How do I determine which fork I pulled?
Tim's user avatar
  • 54.9k
4719 votes
32 answers
1.3m views

How do I update or sync a forked repository on GitHub?

I forked a project, made changes, and created a pull request which was accepted. New commits were later added to the repository. How do I get those commits into my fork?
Lea Hayes's user avatar
  • 63.4k
3367 votes
46 answers
2.5m views

How to add images to README.md on GitHub?

Recently I joined GitHub. I hosted some projects there. I need to include some images in my README File. I don't know how to do that. I searched about this, but all I got was some links which tell me ...
Midhun MP's user avatar
  • 105k
2105 votes
28 answers
1.2m views

Is there a way to cache https credentials for pushing commits?

I recently switched to synchronizing my repositories to https:// on GitHub (due to firewall issues), and it asks for a password every time. Is there a way to cache the credentials, instead of ...
Zepplock's user avatar
  • 28.9k
2048 votes
21 answers
1.8m views

How can I remove a commit on GitHub? [duplicate]

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.
hectorsq's user avatar
  • 75.7k
1957 votes
46 answers
1.7m views

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: [email protected]:foobar/Test.git Its directory structure: Test/...
g_inherit's user avatar
  • 19.6k
1907 votes
11 answers
545k views

How to find a deleted file in the project commit history?

Once upon a time, there was a file in my project that I would now like to be able to get. The problem is: I have no idea of when have I deleted it and on which path it was. How can I locate the ...
Pedro Rolo's user avatar
  • 29.1k
1880 votes
31 answers
2.0m views

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 ...
TooCooL's user avatar
  • 20.7k
1665 votes
50 answers
2.0m views

Message "Support for password authentication was removed."

I got this error on my console when I tried to use git pull: remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/en/get-started/...
Daemes's user avatar
  • 15.6k
1538 votes
10 answers
1.6m views

Create a tag in a GitHub repository

I have a GitHub repository and I need to tag it. I created a tag in a shell using the following command: git tag 2.0 git tag >>> 2.0 The tag does exist locally, but does not appear on GitHub....
Tanel Tammik's user avatar
  • 16.2k
1481 votes
16 answers
1.1m views

GitHub relative link in Markdown file

Is there a way to create a URL anchor, <a>, link from within a Markdown file, to another file within the same repository and branch (aka a link relative to the current branch)? For example, in ...
rynop's user avatar
  • 52k
1223 votes
24 answers
850k views

How to install an npm package from GitHub directly

Trying to install modules from GitHub results in this error: ENOENT error on package.json. Easily reproduced using express: npm install https://github.com/visionmedia/express throws error. npm ...
guy mograbi's user avatar
1217 votes
50 answers
2.3m views

Git push results in "Authentication Failed"

I have been using GitHub for a little while, and I have been fine with git add, git commit, and git push, so far without any problems. Suddenly I am having an error that says: fatal: Authentication ...
zkirkland's user avatar
  • 12.5k
1116 votes
54 answers
1.8m views

GitHub Error Message - Permission denied (publickey)

Anybody seen this error and know what to do? I'm using the terminal, I'm in the root, the GitHub repository exists and I don't know what to do now. > git push -u origin master Permission denied (...
webwrks's user avatar
  • 11.5k
1085 votes
16 answers
815k views

Calculate RSA key fingerprint

I need to do the SSH key audit for GitHub, but I am not sure how do find my RSA key fingerprint. I originally followed a guide to generate an SSH key on Linux. What is the command I need to enter to ...
Zakoff's user avatar
  • 12.8k
1046 votes
69 answers
3.3m views

git error: failed to push some refs to remote

I can't push now, though I could do it yesterday. When I use git push origin master, I get an error: $ git remote -v origin https://github.com/REDACTED.git (fetch) origin https://github.com/REDACTED....
leipzy's user avatar
  • 12.3k
1000 votes
11 answers
1.7m views

git - remote add origin vs remote set-url origin

I create a new repository: git init echo "# MESSAGE" >> README.md git add README.md git commit -m "first commit" Then I want to push my commit to the empty remote repository ...
Irbis's user avatar
  • 12.3k
958 votes
8 answers
1.2m views

Link to the issue number on GitHub within a commit message

Is it somehow possible to automatically have a link to GitHub issue number in the git commit message?
Mika Tuupola's user avatar
  • 20.1k
952 votes
17 answers
1.0m views

There is no tracking information for the current branch

I've been using github from a relatively short period, and I've always used the client to perform commits and pulls. I decided to try it from the git bash yesterday, and I successfully created a new ...
valerio0999's user avatar
  • 11.8k
907 votes
37 answers
1.5m views

Download single files from GitHub

What are some tips on downloading a single file from a GitHub repo? I don't want the URL for displaying the raw file; in the case of binaries, there's nothing. http://support.github.com/discussions/...
Radek Simko's user avatar
896 votes
15 answers
482k views

How to cherry-pick only changes to certain files?

If I want to merge into a Git branch the changes made only to some of the files changed in a particular commit which includes changes to multiple files, how can this be achieved? Suppose the Git ...
Tobias Kienzler's user avatar
893 votes
19 answers
335k views

Make the current commit the only (initial) commit in a Git repository?

I currently have a local Git repository, which I push to a Github repository. The local repository has ~10 commits, and the Github repository is a synchronised duplicate of this. What I'd like to ...
kaese's user avatar
  • 10.4k
884 votes
31 answers
716k views

Git asks for username every time I push

Whenever I try to push into my repo git asks for both username & password. I have no problem in re-entering my password each time but the problem is in entering username. I use https to clone my ...
RanRag's user avatar
  • 49k
879 votes
5 answers
677k views

When does Git refresh the list of remote branches?

Using git branch --all shows all remote and local branches. When does Git refresh this list? On pull/push? And how do I refresh it using Git Bash?
BendEg's user avatar
  • 20.5k
874 votes
23 answers
760k views

Can you get the number of lines of code from a GitHub repository?

In a GitHub repository you can see “language statistics”, which displays the percentage of the project that’s written in a language. It doesn’t, however, display how many lines of code the project ...
Hubro's user avatar
  • 57.8k
872 votes
8 answers
363k views

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 repository. These were made after I forked my copy. How can I pull in the ...
why's user avatar
  • 24.4k
864 votes
10 answers
361k views

Are Git forks actually Git clones?

I keep hearing people say they're forking code in Git. Git "fork" sounds suspiciously like Git "clone" plus some (meaningless) psychological willingness to forgo future merges. There is no fork ...
Brian's user avatar
  • 8,801
861 votes
10 answers
372k views

Remove directory from remote repository after adding them to .gitignore

I committed and pushed some directory to github. After that, I altered the .gitignore file adding a directory that should be ignored. Everything works fine, but the (now ignored) directory stays on ...
janw's user avatar
  • 8,855
853 votes
14 answers
857k views

How to draw checkbox or tick mark in GitHub Markdown table?

I am able to draw checkbox in Github README.md lists using - [ ] (for unchecked checkbox) - [x] (for checked checkbox) But this is not working in table. Does anybody know how to implement checkbox or ...
Gaurav Bishnoi's user avatar
847 votes
35 answers
950k views

SSH Key - Still asking for password and passphrase

I've been somewhat 'putting up' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance within my workflow. I tried ...
HelloWorld's user avatar
  • 10.9k
836 votes
33 answers
557k views

Git keeps prompting me for a 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 Mac OS X and GitHub, and I set up Git and my SSH keys as ...
Catherine's user avatar
  • 13.8k
830 votes
75 answers
1.5m views

Pushing to Git returning Error Code 403 fatal: HTTP request failed

I was able to clone a copy of this repo over HTTPS authenticated. I've made some commits and want to push back out to the GitHub server. Using Cygwin on Windows 7 x64. C:\cygwin\home\XPherior\Code\...
Mike's user avatar
  • 19.5k
826 votes
6 answers
375k views

Pull request vs Merge request

What is the difference between a Pull request and a Merge request? In GitHub, it's a Pull Request while in GitLab, for example, it's a Merge Request. So, is there a difference between both of these?
Pacane's user avatar
  • 20.9k
803 votes
10 answers
216k views

What is the difference between GitHub and gist?

What is the purpose of gist and how is it different from regular code sharing/maintaining using GitHub?
NSExplorer's user avatar
792 votes
42 answers
514k views

Multiple GitHub accounts on the same computer?

Trying to work on both my actual "work" repos, and my repos on GitHub, from my computer. The work account was set up first, and everything works flawlessly. My account, however, cannot seem ...
Kevin Whitaker's user avatar
791 votes
15 answers
855k views

Delete forked repo from GitHub

I'm starting with git and GitHub and there's a project I'm watching on GitHub. I unintentionally clicked to fork it. Now it appears as a new project to me. I have some doubts about it: I know if ...
axcdnt's user avatar
  • 14.3k
791 votes
10 answers
443k views

How to state in requirements.txt a direct github source

I've installed a library using the command pip install git+git://github.com/mozilla/elasticutils.git which installs it directly from a Github repository. This works fine and I want to have that ...
Alfe's user avatar
  • 58k
781 votes
3 answers
87k views

GitHub satanically messing with Markdown - changes 666 to DCLXVI

My GitHub repository has nothing but a readme in it. In this readme, locally I wrote this: Factoids: - There are about six different ways to do everything in Forked. - There are actually six ...
MD XF's user avatar
  • 8,041
779 votes
11 answers
1.6m views

Updating a local repository with changes from a GitHub repository

I've got a project checked locally from GitHub, and that remote repository has since had changes made to it. What's the correct command to update my local copy with the latest changes?
Tom's user avatar
  • 34k
752 votes
21 answers
183k views

Why is a git 'pull request' not called a 'push request'?

The terminology used to merge a branch with an official repository is a 'pull request'. This is confusing, as it appears that I am requesting to push my changes to the official repository. Why is it ...
Alejandro Sanz Díaz's user avatar
743 votes
5 answers
398k views

Change name of folder when cloning from GitHub?

When I clone something from Github, it creates a folder with the same name as the app on my computer. Is there a way to change the name? For example, doing this clone creates a long "sign-in-with-...
Leahcim's user avatar
  • 41.1k
738 votes
52 answers
514k views

gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]

I followed few articles over the pretty attributes on Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global .gitconfig resulting as follows - [filter "lfs"]...
Naman's user avatar
  • 29.8k
733 votes
20 answers
408k views

How to add screenshot to READMEs in github repository?

Is it possible to place a screenshot in README file in a GitHub repository? What's the syntax?
daisy's user avatar
  • 23k
729 votes
17 answers
792k views

Git push existing repo to a new and different remote repo server?

Say I have a repository on git.fedorahosted.org and I want to clone this into my account at github to have my own playground aside from the more "official" repo on fedorahosted. What would be the ...
Heiko Rupp's user avatar
  • 30.7k
694 votes
5 answers
326k views

How can I reference a commit in an issue comment on GitHub?

I find a lot of answers on how to reference a GitHub issue in a git comment (using the #xxx notation). I'd like to reference a commit in my comment, generating a link to the commit details page?
LodeRunner's user avatar
  • 8,163
691 votes
37 answers
983k views

GitHub: invalid username or password

I have a project hosted on GitHub. I fail when trying to push my modifications on the master. I always get the following error message Password for 'https://[email protected]': remote: Invalid username ...
Eurydice's user avatar
  • 8,211
691 votes
34 answers
467k views

View markdown files offline [closed]

Is there a way to display .md files offline so we know what it will look like once it's uploaded in Github? I'm referring to showing the README.md file as it would come out in Github, and not as for ...
enchance's user avatar
  • 29.7k
689 votes
17 answers
1.5m views

How do I create a folder in a GitHub repository?

I want to create a folder in a GitHub repository and then add files to that folder. How do I achieve this?
Sagar's user avatar
  • 7,395
678 votes
22 answers
749k views

Remote origin already exists on 'git push' to a new repository

I have my project on GitHub at some location, [email protected]:myname/oldrep.git. Now I want to push all my code to a new repository at some other location, [email protected]:newname/newrep.git. I used ...
uzumaki naruto's user avatar
673 votes
72 answers
1.1m views

Git Push ERROR: Repository not found

I am having a very strange problem with git and github. When I try and push, I am getting: git push -u origin master ERROR: Repository not found. fatal: The remote end hung up unexpectedly I added ...
Justin's user avatar
  • 44.1k

1
2 3 4 5
1162