English

Share local project on GitHub

This post will show how to share a local project on GitHub in a few easy steps using the command line and a few actions taking on GitHub’s website.

Create and init your local GitHub repository

  1. Go to https://github.com and create the repository for your project;
  2. When prompted by GitHub, init your new repository so a new master branch is created.

Sync the local and remote repositories

Init your project root folder as a Git repository:

git init

Add the remote GitHub repository to your local Git repository:

git remote add origin https://github.com/<github_user>/<github_project>.git

Fetch the remote branches:

git fetch origin

Checkout and set the master’s branch to point to the remote branch:

git checkout -b master --track origin/master

Hope it helps. Cya!

References

bgasparotto

Recent Posts

Python function decorator

This guide will show you how to create a Python function decorator with a few…

2 years ago

Got permission denied while trying to connect to the Docker daemon socket

This guide will show you how to fix the error Got permission denied while trying…

2 years ago

Python virtual environment on Intellij IDEA

This guide will show you how to create a Python virtual environment on Intellij IDEA…

2 years ago

Find and kill processes on Linux and Mac by port number

This tutorial will quickly show you how to to find and kill processes on Linux,…

2 years ago

Python: Relocation R_X86_64_PC32 against symbol can not be used when making a shared object Error

This guide shows a possible solution for Python error Relocation R_X86_64_PC32 against symbol can not…

2 years ago

Kubernetes useful commands

I condensed below a cheat sheet of Kubernetes useful commands. I will keep updating this…

2 years ago