๐
๐
๐
๐
CLI Cheatsheet ๐ง ๐ฎ๐ฉ
Github
Searchโฆ
Introduction
Chocolatey
Firebase
Git
Heroku
Hugo
Netlify
Nextcloud
now
npm
Other framework
PowerShell
Vercel
Vue
Deta
Powered By
GitBook
Git
Git is a distributed version-control system for tracking changes in source code during software development. It is designed for coordinating work among programmers, but it can be used to track changes
Perintah umum
Untuk bantuan ketik
git help
.
Membuat repo baru
Jalankan perintah berikut dalam folder project.
1
git
init
2
git
add
.
3
git
commit -am
'Initial commit'
Copied!
Menambahkan remote git url
Beberapa cara yang dapat digunakan adalah,
1
git
remote
add
origin
<
GIT_REPO_URL
>
Copied!
1
git
remote
add
github
<
GITHUB_REPO_URL
>
Copied!
1
git
remote
add
gitlab
<
GITLAB_REPO_URL
>
Copied!
Gabungan ketiga cara diatas, dalam 1 baris.
1
git
remote set-url --add origin
<
GITHUB_REPO_URL
>
&&
git
remote set-url --add origin
<
GITLAB_REPO_URL
>
Copied!
Pada saat mau
git push
tinggal eksekusi satu perintah ini.
1
git
push -u origin master
Copied!
Mengecek alamat remote git url
1
git
remote show origin
Copied!
Push data ke remote git
1
git
push -u origin master
Copied!
1
git
push -u github master
Copied!
Pull data dari remote git
1
git
pull origin master
Copied!
1
git
pull origin master --allow-unrelated-histories
Copied!
1
git
pull github master
Copied!
Mengganti url remote repo
1
git
remote set-url origin
<
GIT_REPO_BARU
>
Copied!
Clone repo
1
git
clone
<
GIT_REPO_URL
>
Copied!
Buat branch baru
1
git
checkout -b
<
NAMA_BRANCH
>
Copied!
Pindah ke branch lain
1
git
checkout
<
NAMA_BRANCH
>
Copied!
Merge perubahan dari branch lain
1
git
merge
<
NAMA_BRANCH
>
Copied!
Previous
Firebase
Next
Heroku
Last modified
1yr ago
Copy link
Contents
Perintah umum
Membuat repo baru
Menambahkan remote git url
Mengecek alamat remote git url
Push data ke remote git
Pull data dari remote git
Mengganti url remote repo
Clone repo
Buat branch baru
Pindah ke branch lain
Merge perubahan dari branch lain