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.

GitHub is a web-based Git repository hosting service. It offers all of the distributed revision control and source code management (SCM) functionality of Git, as well as adding its own features.

Unlike Git, which is strictly a command-line tool, GitHub provides a Web-based graphical interface with desktop, as well as mobile, integration. It also provides access control and several features for collaboration such as bug tracking, feature requests, task management, and wikis for each hosted project.

GitHub offers plans for private repositories, as well as free accounts, which are usually used to host open-source software projects. As of January 2023, GitHub reports having more than 100 million users and more than 372 million repositories, making it the largest host of source code in the world.

GitHub Pages is a service they offer that will host static websites using code from a public repository's main branch. The URL format is https://username.github.io.

Source: GitHub Wikipedia

Using pull requests

Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

Tutorial: Creating a Pull Request

Resources

Graphical clients for certain platforms:

56809 questions
5310
votes
27 answers

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
  • 53,399
  • 3
  • 19
  • 19
4643
votes
31 answers

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
  • 62,536
  • 16
  • 62
  • 111
3228
votes
44 answers

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 to "host images on web and specify the image path…
Midhun MP
  • 103,496
  • 31
  • 153
  • 200
2086
votes
28 answers

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 authenticating every time that git push?
Zepplock
  • 28,655
  • 4
  • 35
  • 50
2004
votes
21 answers

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.
hectorsq
  • 74,396
  • 19
  • 43
  • 46
1875
votes
43 answers

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/ …
g_inherit
  • 18,771
  • 3
  • 16
  • 5
1846
votes
30 answers

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 a username and password, but not when I'm using…
TooCooL
  • 20,356
  • 6
  • 30
  • 49
1834
votes
11 answers

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 commits of this file when it existed?
Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
1532
votes
49 answers

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…
Daemes
  • 14,239
  • 3
  • 6
  • 13
1472
votes
10 answers

Create a tag in a GitHub repository

I have a repository in GitHub and I need to tag it. I tagged in a shell, but on GitHub, it is not showing up. Do I have to do anything else? The command I used in the shell is: git tag 2.0 And now when I type git tag it shows: 2.0 So it seems…
Tanel Tammik
  • 15,489
  • 3
  • 22
  • 31
1199
votes
22 answers

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 install express works. Why can't I install from…
guy mograbi
  • 27,391
  • 16
  • 83
  • 122
1181
votes
47 answers

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 Failed In the terminal I cloned a repository,…
zkirkland
  • 12,175
  • 3
  • 16
  • 18
1077
votes
52 answers

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 (publickey). fatal: Could not read from remote…
webwrks
  • 11,158
  • 5
  • 24
  • 21
1068
votes
16 answers

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 find my current RSA key fingerprint?
Zakoff
  • 12,665
  • 5
  • 22
  • 35
1
2 3
99 100