github

Squash, fixup and remove commits on GitHub

Multiple numbers of commits on a pull-request can be merged into a single commit using the squash and fixup option provided by Github. This article is to check how to merge different commits on your Github repository or remove any unwanted commits on your pull request.

Consider the following example to do this -

1. Create a local git branch on your terminal. 

$ git checkout upstream/master -b test_branch

where -

List of some useful Git Commands

Git provides a various set of commands to operate the repository on our local setup. Eg. git clone to copy the repo from the upstream, git status to check what files, etc are changed, git commit to save our changes, push and pull to update and retrieve from the upstream. Here are some other useful git commands which are mostly used by users in following cases.

Delete git branch from local and remote

Github provides different options to delete unwanted branches on your git terminal or from remote github repository.

Delete a branch from your local git terminal.

Use a simple --delete option to delete a branch from your local git.

git branch --delete <branch_name>

This will not delete a branch if you have a commit or any work in progress. To delete it forcefully, use -D with the branch name.

Create free website using Github

GitHub provides a very good platform to keep our repositories, modify and control them in an organised way. It also enables us to create free website of our own with a domain ".github.io".

All you need is an HTML template which can be downloaded for free based on your requirement(blog, wedding website, etc) or a code which is capable of displaying a webpage.