Skip to main content

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
5532 votes
26 answers
4.8m 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
  • 55.6k
4741 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.7k
3419 votes
46 answers
2.6m 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
  • 106k
2110 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
2058 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
  • 76.2k
1985 votes
47 answers
1.7m views

Download a single folder or directory from a GitHub repository

How can I download only a specific folder or directory from a remote Git repository hosted on GitHub? Say the example GitHub repository lives here: [email protected]:foobar/Test.git Its directory ...
g_inherit's user avatar
  • 19.9k
1930 votes
11 answers
560k 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.3k
1893 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.9k
1709 votes
51 answers
2.1m 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
  • 16k
1568 votes
10 answers
1.7m 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.5k
1509 votes
16 answers
1.2m 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
  • 52.4k
1230 votes
54 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.7k
1228 votes
24 answers
862k 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
  • 28.3k
1122 votes
55 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.6k
1091 votes
16 answers
825k 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.9k
1061 votes
70 answers
3.4m 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.5k
1036 votes
12 answers
1.9m 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.6k
964 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.9k
963 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.2k
910 votes
15 answers
498k 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
909 votes
38 answers
1.6m 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
899 votes
14 answers
910k 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
898 votes
19 answers
340k 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.5k
894 votes
23 answers
790k 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
  • 58.3k
892 votes
5 answers
695k 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.8k
886 votes
31 answers
728k 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
  • 49.2k
881 votes
8 answers
373k 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.5k
866 votes
10 answers
378k 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,915
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
855 votes
36 answers
977k 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
842 votes
33 answers
571k 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.9k
836 votes
76 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.6k
834 votes
6 answers
383k 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
  • 21.1k
809 votes
42 answers
534k 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
807 votes
10 answers
218k 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
799 votes
11 answers
457k 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
  • 58.5k
794 votes
15 answers
864k 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.4k
782 votes
11 answers
1.7m 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
  • 34.1k
779 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,061
766 votes
21 answers
189k 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
749 votes
53 answers
538k 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
  • 30.5k
737 votes
20 answers
415k 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
  • 23.2k
735 votes
18 answers
813k 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
703 votes
5 answers
336k 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,263
698 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,485
697 votes
37 answers
1.0m 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,271
692 votes
34 answers
472k 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
  • 30k
678 votes
71 answers
1.2m 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.6k
678 votes
22 answers
759k 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
5 answers
202k views

How to update a pull request from forked repo?

So I first forked a repo and then made a commit to that forked repo. I then opened a pull request. The pull request listed all the changes I wanted. After reviewing my pull request, there were a ...
stevebot's user avatar
  • 23.8k

1
2 3 4 5
1168