Git and GitHub: Tips and Tricks

Using Git to manage your code? We all know about git init, commit, etc. But here are some handy git commands for common scenarios:

Clone from GitHub

Unlink your Local Repo from GitHub

Ever want to use an example app on GitHub as a starting point for your application or component, and want to unlink it from the original GitHub address?

This can be done in two steps:

This will delete the config settings from .git/config.

Then, issue

to get rid of the FETCH_HEAD, which still points to GitHub.

Help with the Most Common Git Commands

Search your Change Log

Where was that checkin that I did which altered the “foo” class? 

List all Conflicting Files

Reword the Previous Commit Message


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.