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
553
votes
4 answers

What is the difference between origin and upstream on GitHub?

What is the difference between origin and upstream on GitHub? When a git branch -a command is executed, some branches it displays have a prefix of origin (remotes/origin/..) while others have a prefix of upstream (remotes/upstream/..).
jan
  • 5,901
  • 4
  • 16
  • 5
551
votes
10 answers

Untrack files from git temporarily

I have setup a local git on my machine. When I initialized git, I added pre-compiled libs and binaries. However, now during my development I don't want to check in those files intermittently. I dont want to remove these files from repo. Is there any…
agent.smith
  • 9,134
  • 9
  • 37
  • 49
547
votes
6 answers

Is there a naming convention for git repositories?

For example, I have a RESTful service called Purchase Service. Should I name my repository: purchaserestservice purchase-rest-service purchase_rest_service or something else? What's the convention? How about in GitHub? Should public repositories…
Adrian M
  • 7,047
  • 7
  • 24
  • 26
546
votes
2 answers

Git - Pushing code to two remotes

I have two remote git repositories. origin and github I push my branch devel to both repositories. git push -u origin devel git push -u github devel But then, when I do. git push It would only get pushed to github. Is there anyway I can set up my…
yasith
  • 8,981
  • 7
  • 27
  • 32
544
votes
17 answers

Is it possible to use pip to install a package from a private GitHub repository?

I am trying to install a Python package from a private GitHub repository. For a public repository, I can issue the following command which works fine: pip install git+git://github.com/django/django.git However, if I try this for a private…
Adam J. Forster
  • 17,789
  • 9
  • 25
  • 20
541
votes
8 answers

How to apply unmerged upstream pull requests from other forks into my fork?

A project on GitHub that I have a fork of has a new pull requests that I want to pull into my fork that the author has not pulled in yet. Is there a simple way to apply pull request from other forks into my fork? Is there something else here that I…
leek
  • 11,803
  • 8
  • 45
  • 61
537
votes
14 answers

How can I see the size of a GitHub repository before cloning it?

Is there a way to see how big a Git repository is on GitHub before you decide to clone it? This seems like a really obvious/basic statistic, but I can't find how to see it on GitHub at all.
jhabbott
  • 18,461
  • 9
  • 58
  • 95
536
votes
7 answers

How can I rollback a git repository to a specific commit?

My repo has 100 commits in it right now. I need to rollback the repository to commit 80, and remove all the subsequent ones. Why? This repo is supposed to be for merging from miscellaneous users. A bunch of merges went in as commits from me, due to…
Jonathan Vanasco
  • 15,111
  • 10
  • 48
  • 72
530
votes
51 answers

Git, fatal: The remote end hung up unexpectedly

When I tried to run git push origin master --force I just got Counting objects: 2649, done. Delta compression uses up to 2 threads. Compressing objects: 100% (1280/1280), done. error: RPC failed; result=22, HTTP code = 413 | 116 KiB/s fatal: The…
DanielLC
  • 5,801
  • 5
  • 18
  • 16
517
votes
1 answer

How to find out "The most popular repositories" on Github?

Once upon a time, we can watch the most popular repositories (Most forked or Most watched) at this page (https://github.com/popular/watched) of Github. like this: But now when you try to explore repos, you can only see the Top 25 trending…
wiky
  • 6,178
  • 3
  • 16
  • 10
516
votes
21 answers

How can I check out a GitHub pull request with git?

I'd like to check out a previously created pull request (created via GitHub web interface). I searched and found different places where a refs/pull or refs/pull/pr But when I add fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to the git config…
GarfieldKlon
  • 11,170
  • 7
  • 31
  • 33
511
votes
11 answers

How to see an HTML page on Github as a normal rendered HTML page to see preview in browser, without downloading?

On http://github.com developer keep the HTML, CSS, JavaScript and images files of the project. How can I see the HTML output in browser? For example this: https://github.com/necolas/css3-social-signin-buttons/blob/master/index.html When I open this…
Jitendra Vyas
  • 148,487
  • 229
  • 573
  • 852
509
votes
23 answers

How to add color to GitHub's README.md file

I have a README.md file for my project underscore-cli, and I want to document the --color flag. Currently, the only way to do this is with a screenshot (which can be stored in the project repository): But screenshots aren't text, preventing readers…
Dave Dopson
  • 41,600
  • 19
  • 95
  • 85
508
votes
9 answers

Custom domain for GitHub project pages

I have a gh-pages branch in one of my http://github.com repos. The GitHub project pages works fine if I go to http://myuser.github.com/myrepo I want to setup a custom domain (myexample.com) that will serve up this project pages. I want both…
rynop
  • 50,086
  • 26
  • 101
  • 112
508
votes
9 answers

How to link to a specific line number on GitHub

I know I can link to a specific line number on a file on a GitHub repository (I'm sure I've seen this before)... How can I do this?
sfletche
  • 47,248
  • 30
  • 103
  • 119