This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"gopkg.in/yaml.v3" | |
) | |
var data string = ` | |
# comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -b darwin-enchancement # buat branch baru (seperti membuat dunia parallel) | |
echo "tambah fitur ldarwin-enchancement" >> catatan-sejarah.txt # lakukan perubahan | |
git add . -A | |
git commit -m 'tambah fitur ldarwin-enchancement' # lakukan commit | |
git push -u origin darwin-enchancement # simpan branch ke github | |
git log | |
cat catatan-sejarah.txt # di sini file catatan-sejarah berisi 2 baris text | |
git checkout master # kembali ke dunia parallel "light-and-darkness" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -b light-and-darkness # buat branch baru (seperti membuat dunia parallel) | |
echo "tambah fitur light-and-darkness" >> catatan-sejarah.txt # lakukan perubahan | |
git add . -A | |
git commit -m 'tambah fitur light-and-darkness' # lakukan commit | |
git push -u origin light-and-darkness # simpan branch ke github | |
git log | |
cat catatan-sejarah.txt # di sini file catatan-sejarah berisi 2 baris text | |
git checkout master # kembali ke dunia parallel awal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin [email protected]:goFrendiAsgard/git-workshop.git # menghubungkan repository lokal dengan repository publik di github | |
git push -u origin master # push ke github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "awal yang bagus" > catatan-sejarah.txt # buat file "catatan-sejarah.txt", beri nilai "awal yang bagus" | |
git add . -A # stage semua file dalam directory ini. Tanda "." berarti "current directory", dan parameter "-A" berarti semua | |
git commit -m "sebuah awal" # commit semua perubahan sejauh ini dengan pesan "sebuah awal" | |
git log # lihat semua sejarah sejauh ini | |
# commit f3708176f813ec10e0c92b4724ce422320c4ede0 (HEAD -> master) | |
# Author: gofrendi <[email protected]> | |
# Date: Thu Mar 26 16:29:07 2020 +0700 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir git-workshop | |
cd git-workshop | |
git init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for buah in $(echo jeruk strawberry anggur) | |
do | |
echo ${buah} | |
done | |
for angka in $(seq 0 2) | |
do | |
echo ${angka} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NILAI=50 | |
if [ $NILAI -gt 90 ] | |
then | |
echo "Gold" | |
elif [ $NILAI -gt 70 ] | |
then | |
echo "Silver" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# baca dari input argument | |
NAME=${1} | |
echo Hello ${NAME} | |
# baca dari jawaban user | |
echo "What is your name again?" | |
read NAME | |
echo Hello ${NAME} |
NewerOlder