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:
Enter the new repository name in the provided field and click "Rename".
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
- Link to the issue number on GitHub within a commit message
- Closing issues using keywords
- Mastering Issues
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:
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.