GitHub-CheatSheet

Master GitHub with this comprehensive cheat sheet. Find essential Git commands, tips for managing repositories, closing issues, and linking between projects.

GitHub Cheat Sheet

GitHub Cheat Sheet

Setting Up Remote Repositories

To set up a remote repository from the command line, use the following command:

git remote add origin https://github.com/VijayNew/NewExample.git

For troubleshooting, see Why does Git tell me “No such remote 'origin'” when I try to push to origin?

Renaming a Repository

To rename a repository, navigate to your repository's settings on GitHub:

GitHub Repository Settings

Enter the new repository name in the provided field and click "Rename".

GitHub Rename Repository

Refer to How to rename a directory/folder on GitHub website? for more details.

Closing Issues with Commit Messages

You can automatically close GitHub issues by including specific keywords in your commit messages:

fix #n
close #n
resolve #n

Linking to Issues or PRs in Different Repos

To link to an issue or pull request in a different repository, use the following format:

jlord/sheetsee.js#26

GitHub Wiki Sidebar Management

Install and use the github-wiki-sidebar tool:

npm install github-wiki-sidebar -g
github-wiki-sidebar --git-push

See the GitHub Wiki Sidebar npm package for more information.

Star History Visualization

Track the star history of repositories:

Star History Chart

GitHub Desktop Integration

Launching GitHub Desktop

You can launch GitHub Desktop directly from your command line:

github

For related issues, see Ssh-agent is running. Authentication failed. I cannot push on repos I cloned using git bash. #7360.

Further References

  1. GitHub Secrets
  2. How to rename a directory/folder on GitHub website?
  3. GitHub Wiki Sidebar