GitHub is an open source platform that makes it easy for developers to showcase their work. It also lets them keep track of changes and collaborate on projects.

Despite its popularity, many developers are not aware of some simple tricks and hacks of GitHub. Here are at most 5 hacks you might not be aware of.

1. Initiate a public repository – GitHub

Git lets you keep track of any changes that are made to projects. Git, a famous Git host platform, allows you and your team to easily manage the files and folders of your project.

GitHub lets you create public repositories to share your work. It is a good way to establish your developer reputation. You can also track your progress through pushing your code between your Git- Hub account, your development machine and back again.

Create a public repositories by signing in to your GitHub profile and clicking New. You will be asked to fill in the name and brief description of your repository on the next page. You can also choose the visibility of your repo: public, internal for your personal/organizational account or private for a specific group of users.

2. You can create a private repository

A private repository at GitHub is the best option to house and manage your source code. This allows you to create access levels and keeps your projects secure from any unauthorized modifications.

Although it is possible to create a private copy of any repository on GitHub, the process can take some time. It’s not possible to create an SSH Key automatically by GitHub so that you can establish a secure connection to the server.

The good news is that you can still clone your private repo by using the SSH URL instead. Just remember to copy that URL when you’re prompted for your password.

3. A pull request can be created

Pull requests enable you to make and ask someone else to review your code. It is an effective tool that allows groups to communicate and collaborate about their code.

To create a pull-request, select the repository or branch that you would like to use to change your code. You can also choose a specific issue that you want to work on.

Once you’ve made any code changes, GitHub will show the differences (diffs), between each of your branches. It is an excellent way to go through all your changes and review them before you submit them.

4. You can make a fork

GitHub makes it easy to connect with others working on open source projects. You can easily track your code and create it.

The fork feature is probably the best way to add to a GitHub repo. Fork allows you to have a copy from the upstream repo within your account. This makes it possible for you to make changes and not impact the original repository.

A fork in GitHub is also useful to make Pull Requests for new features and bugs for the upstream projects. GitHub is unlike other service, allowing contributors to clone a upstream repository from their computer, and to stage the changes they propose before uploading them to a public, hosted repository.

GitKraken is a great tool to help you create forks. It is a simple and quick way to begin contributing to GitHub repositories.

5. Create a new branch

Creating a Branch is a crucial skill to have if you use GitHub. This simple command allows you access code elsewhere while maintaining it locally.

Branching is useful for working on bugs or features without having to alter the production code. You also have the option to use branches to create hotfixes, or test features prior to going live.

Creating branches is simple and easy to use. It is one the easiest ways to control your code. Additionally, it allows you to work together.

Follow me – Pratik Pathak (@pratikpathak.exe) • Instagram photos and videos

Download the Premium GitHub/Git Cheatsheet


Categorized in: