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
676
votes
5 answers

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
  • 7,975
  • 3
  • 22
  • 24
675
votes
35 answers

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://git@github.com': remote: Invalid username or password. fatal: Authentication failed for…
Eurydice
  • 8,001
  • 4
  • 24
  • 37
672
votes
22 answers

Remote origin already exists on 'git push' to a 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…
uzumaki naruto
  • 6,979
  • 3
  • 18
  • 12
671
votes
5 answers

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 number of changes that the repo owner wanted me to…
stevebot
  • 23,275
  • 29
  • 119
  • 181
661
votes
16 answers

How do I create a folder in a GitHub repository?

I want to create a folder in a GitHub repository and want to add files in that folder. How do I achieve this?
Sagar
  • 7,115
  • 6
  • 21
  • 35
650
votes
70 answers

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 the remote: git remote add origin…
Justin
  • 42,716
  • 77
  • 201
  • 296
638
votes
25 answers

GitHub "fatal: remote origin already exists"

I am trying to follow along Michael Hartl's Rails tutorial but I've run across an error. I signed up at GitHub, issued a new SSH key, and created a new repository. But when I enter the next line into the terminal, I get the following…
ppreyer
  • 6,547
  • 4
  • 20
  • 18
626
votes
14 answers

Import existing source code to GitHub

How can I import source code from my computer to my GitHub account?
Mohammad Ali Akbari
  • 10,345
  • 11
  • 44
  • 62
617
votes
7 answers

Why are connections to GitHub over SSH throwing an error "Warning: Remote Host Identification Has Changed"?

Just sometime ago I started getting this warning when pushing to GitHub. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle…
Dheeraj Vepakomma
  • 26,870
  • 17
  • 81
  • 104
605
votes
4 answers

How to commit a change with both "message" and "description" from the command line?

I can push commits to GitHub via git (on the command line, not the Mac app). When I push commits directly from the GitHub web interface (e.g. quickly fixing a typo), I have the chance to "comment" the commit, and GitHub gives me a commit title and a…
whatyouhide
  • 15,897
  • 9
  • 57
  • 71
584
votes
2 answers

how to delete all commit history in github?

I want to delete all commit history but keep the code in its current state because, in my commit history, there are too many unused commits. How can I do it? Is there any git command can do this? git filter-branch ? git rebase ? ... My code is…
Chinaxing
  • 8,054
  • 4
  • 28
  • 36
582
votes
15 answers

Link and execute external JavaScript file hosted on GitHub

When I try to change the linked reference of a local JavaScript file to a GitHub raw version my test file stops working. The error is: Refused to execute script from ... because its MIME type (text/plain) is not executable, and strict MIME type…
AuthorProxy
  • 7,946
  • 3
  • 27
  • 40
582
votes
4 answers

Superscript in markdown (Github flavored)?

Following this lead, I tried this in a Github README.md:
seinecle
  • 10,118
  • 14
  • 61
  • 120
557
votes
18 answers

How do I center an image in the README.md file on GitHub?

I've been looking at the Markdown syntax used in GitHub for a while, but except resizing an image to the width of the README.md page, I can't figure out how to center an image in it. Is this possible? If so, how can I do it?
Johnny Pauling
  • 12,701
  • 18
  • 65
  • 108
555
votes
31 answers

Authenticate with GitHub using a token

I am trying to authenticate with GitHub using a personal access token. In the help files at GitHub, it states to use the cURL method to authenticate (Creating a personal access token). I have tried this, but I still cannot push to GitHub. Please…
wayofthefuture
  • 8,339
  • 7
  • 36
  • 53