09 Mei 2020

To Practice Git without GitHub

The following script is useful if you want to practice Git without GitHub. Here, GitHub's replacement will be folder "remoteDir/," while the working folder will be "workingDir/." 

Let's get started!

 

# Uncomment to DELETE the old folders 
# rm -rf remoteDir/ workingDir/ ;
git init workingDir/;
git init remoteDir/ --bare;
cd workingDir/;
git commit -am "Init" --allow-empty;
git remote add origin ../remoteDir/;
git push --set-upstream origin master;
git branch -v;
git remote -v;
git status;


Let's give it a spin!

 

touch file1.txt;
git status --short;
git add file1.txt;
git status --short;
git commit -m file1.txt;
git status;
git push;
git status;


DISCLAIMER


This is HOW Me Do IT! Grrr... this blog memo is mainly written for OWN PURPOSES. This post is based on "Google Here, There, and Everywhere". Whether this is PLAGIARY or RESEARCH, there has never been a claim that this is an original work, nor is it necessarily the best solution, and not for Scopus consumption :). Please provide feedback, especially if you have alternative explanations. Hopefully, this note will be helpful in the future when you have forgotten how to solve this trivia problem.


DISKLAIMER


INIlah yang KUlakukan! Grrr... memo blog ini terutama ditulis untuk KEPERLUAN SENDIRI. Tulisan ini berbasis "Google Sana, Google Sini, Coba Itu, Coba Ini, Lalu Tanya-tanyi". Entah ini PLAGIAT, entah ini RISET, yang jelas tidak pernah ada klaim bahwa ini merupakan karya asli, serta belum tentu pula merupakan solusi terbaik, serta bukan untuk konsumsi Scopus :). Mohon kiranya memberikan tanggapan, terutama jika memiliki solusi alternatif. Semoga catatan ini akan bermanfaat di masa mendatang, saat sudah lupa cara menyelesaikan masalah trivia ini.

This is the Way!

Tidak ada komentar:

Posting Komentar