Sitemap

Create, clone, commit, push

A first experience with Git Bash

--

This story is very basic. Please be patient as you read it.

Create account

Sign in

Create repository

  • Sign in to your GitHub account, e.g. dudung.
  • Notice on top of your screen the global navigation menu.
  • Find the icon with plus sign + choose New repository as follows.
Press enter or click to view image in full size
  • Fill the repository name, e.g. fisika-di-balik-kopi.
  • Fill (optional) the description, e.g. A talk about coffee and physics in Karawang.
Press enter or click to view image in full size
  • Keep the visibility still Public.
  • Add README by turning it on.
  • Keep without .gitignore or No .gitignore option.
  • Choose license, e.g. MIT License.
Press enter or click to view image in full size
  • Notice that the new repository is created.
Press enter or click to view image in full size

Install Git Bash

Press enter or click to view image in full size

Open Command Prompt

  • On Windows, open File Explorer and navigate to you working folder, e.g. v:\temp.
Press enter or click to view image in full size
  • Using mouse right click and choose Open in Terminal.
Press enter or click to view image in full size
  • On the new window Command Prompt, you can list available files, i.e. type dir and press Enter key.
  • Notice that there is not any files available.

Open Git Bash

  • In the same folder right click and this time choose Show more options.

Get Sparisoma Viridi’s stories in your inbox

Join Medium for free to get updates from this writer.

Press enter or click to view image in full size
  • Choose Git Bash Here.
Press enter or click to view image in full size
  • On the new window MINGW64, you can list the file, i.e. type ls and press enter key.
  • Notice that there is not any files available also.

Command Line Interface

Both Command Prompt and Git Bash are CLIs (Command Line Interfaces), but they have different origin and style. The former is Native Microsoft Windows environment, while the latter is Linux / Unix-based emulation (when in Windows).

Clone repository

  • Step into the Git Bash window.
  • Type following command and get the result as follows.
  • List again using ls and get the result.
  • Compare the result from local storage to the remote one as follows.
Press enter or click to view image in full size
  • Notice they are showing the same files in local and remote storage.

Commit

  • On Windows use File Explorer to create .gitignore file.
Press enter or click to view image in full size
Press enter or click to view image in full size
Press enter or click to view image in full size
  • Edit the file to have following content.
Press enter or click to view image in full size
  • Back to Git Bash and type git status.
  • Add new file using git add and commit with as follows.
  • Notice that there is an published work to the remote storage.

Push

  • Use git push to upload your local repository commits and internal Git objects to a remote repository, e.g. GitHub.
  • View the remote files via web browers as follows.
Press enter or click to view image in full size
  • Notice that it shows the update file, which is .gitignore.

Summaries

  • Steps to create a remote repository on GitHub, clone it to local storage, modify it by adding new file, commit the change, and push the change to GitHub have been presented.
  • Guidance to compare the states of local and remote storage also given, in emphasizing the role of git clone and git push.
  • The use of git pull has not been discussed.

References

  1. -, “Quickstart for your personal dashboard”, GitHub Docs, 2026, url https://docs.github.com/en/enterprise-server@3.19/account-and-profile/get-started/personal-dashboard-quickstart [20260828].
  2. Priyanshu Kumar Sharma, “Step-by-Step Guide to Install Git: A Beginner’s Tutorial”, Medium, 6 Sep 2026, url https://medium.com/p/bda845383e73 [20260828]. Priyanshu Kumar Sharma

--

--