From dc95652a78a3ede7752c46de080dd0c6f5d96c49 Mon Sep 17 00:00:00 2001
From: Cipto Hadi just a simple guide for getting started with git. no deep shit ;) hanya sebuah panduan ringkas untuk mulai menggunakan git, tanpa basa-basi ;)
- create a new directory, open it and perform a
- create a working copy of a local repository by running the command
- your local repository consists of three "trees" maintained by git.
- the first one is your
- You can propose changes (add it to the Index) using hanya sebuah panduan ringkas untuk mulai menggunakan git, tanpa basa-basi ;)
+ buat direktori baru, masuk dan jalankan perintah
+ buat salinan dari repositori lokal dengan menjalankan perintah
+ repositori lokal Anda terdiri dari tiga "trees" yang dipelihara oleh git.
+ yang pertama adalah
+ Anda dapat mengusulkan perubahan (menambahkan ke Index) menggunakan
+ Your changes are now in the HEAD of your local working copy. To send those changes to your remote repository, execute
+ Branches are used to develop features isolated from each other. The master branch is the "default" branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion.
+
+ create a new branch named "feature_x" and switch to it using
+ to update your local repository to the newest commit, execute
+ it's recommended to create tags for software releases. this is a known concept, which also exists in SVN. You can create a new tag named 1.0.0 by executing
+ in its simplest form, you can study repository history using..
+
+ In case you did something wrong (which for sure never happens ;) you can replace local changes using the command
+ If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this
+ built-in git GUI
+
+
+ hanya sebuah panduan ringkas untuk mulai menggunakan git, tanpa basa-basi ;) just a simple guide for getting started with git. no deep shit ;)
- buat direktori baru, masuk dan jalankan perintah
- buat salinan dari repositori lokal dengan menjalankan perintah
- repositori lokal Anda terdiri dari tiga "trees" yang dipelihara oleh git.
- yang pertama adalah
- Anda dapat mengusulkan perubahan (menambahkan ke Index) menggunakan
- Anda dapat mengusulkan perubahan (menambahkan ke Index) menggunakan
built-in git GUI
- Your changes are now in the HEAD of your local working copy. To send those changes to your remote repository, execute git - the simple guide
- git - panduan ringkas
+ git - the simple guide
create a new repository
+ membuat repositori baru
+ buat direktori baru, masuk dan jalankan perintah
git init
- to create a new git repository.
+ untuk membuat repositori baru git.
checkout a repository
+ checkout repositori
+ buat salinan dari repositori lokal dengan menjalankan perintah
git clone /path/to/repository
- when using a remote server, your command will be
+ bila servernya remote, perintahnya sebagai berikut
git clone username@host:/path/to/repository
workflow
+ alurkerja
Working Directory which holds the actual files.
- the second one is the Index which acts as a staging area and
- finally the HEAD which points to the last commit you've made.
+ repositori lokal Anda terdiri dari tiga "trees" yang dipelihara oleh git.
+ yang pertama adalah Direktori Kerja yang berisi berkas sebenarnya.
+ yang kedua adalah Index yang berfungsi sebagai "a staging area" (area antara)
+ dan terakhir adalah HEAD yang merujuk pada "commit" terakhir.
add & commit
+ menambahkan & commit
+ Anda dapat mengusulkan perubahan (menambahkan ke Index) menggunakan
git add <filename>
git add *
- This is the first step in the basic git workflow. To actually commit these changes use
+ Ini langkah pertama dalam alurkerja dasar git. Untuk benar-benar "commit" perubahan tsb, jalankan
git commit -m "Commit message"
- Now the file is committed to the HEAD, but not in your remote repository yet.
+ Sekarang file nya sudah ter "commit" ke HEAD, tapi belum ke repositori "remote".
git - panduan ringkas
+
+
+
+ membuat repositori baru
+
+ git init
+ untuk membuat repositori baru git.
+ checkout repositori
+
+ git clone /path/to/repository
+ bila servernya remote, perintahnya sebagai berikut
+ git clone username@host:/path/to/repository
+ alurkerja
+ Direktori Kerja yang berisi berkas sebenarnya.
+ yang kedua adalah Index yang berfungsi sebagai "a staging area" (area antara)
+ dan terakhir adalah HEAD yang merujuk pada "commit" terakhir.
+
+ menambahkan & commit
+
+ git add <filename>
+ git add *
+ Ini langkah pertama dalam alurkerja dasar git. Untuk benar-benar "commit" perubahan tsb, jalankan
+ git commit -m "Commit message"
+ Sekarang file nya sudah ter "commit" ke HEAD, tapi belum ke repositori "remote".
+ pushing changes
+
+ git push origin master
+ Change master to whatever branch you want to push your changes to.
+
+ If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it with
+ git remote add origin <server>
+ Now you are able to push your changes to the selected remote server
+
+ branching
+
+
+ git checkout -b feature_x
+ switch back to master
+ git checkout master
+ and delete the branch again
+ git branch -d feature_x
+ a branch is not available to others unless you push the branch to your remote repository
+ git push origin <branch>
+ update & merge
+
+ git pull
+ in your working directory to fetch and merge remote changes.
+ to merge another branch into your active branch (e.g. master), use
+ git merge <branch>
+ in both cases git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts.
+ You are responsible to merge those conflicts
+ manually by editing the files shown by git. After changing, you need to mark them as merged with
+ git add <filename>
+ before merging changes, you can also preview them by using
+ git diff <source_branch> <target_branch>
+ tagging
+
+ git tag 1.0.0 1b2e1d63ff
+ the 1b2e1d63ff stands for the first 10 characters of the commit id you want to reference with your tag. You can get the commit id by looking at the...
+ log
+ git log
+ You can add a lot of parameters to make the log look like what you want. To see only the commits of a certain author:
+ git log --author=bob
+ To see a very compressed log where each commit is one line:
+ git log --pretty=oneline
+ Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches:
+ git log --graph --oneline --decorate --all
+ See only which files have changed:
+ git log --name-status
+ These are just a few of the possible parameters you can use. For more, see
+ git log --help
+ replace local changes
+
+ git checkout -- <filename>
+ this replaces the changes in your working tree with the last content in HEAD. Changes already added to the index, as well as new files, will be kept.
+
+ git fetch origin
+ git reset --hard origin/master
+ useful hints
+
+ gitk
+ use colorful git output
+ git config color.ui true
+ show log on just one line per commit
+ git config format.pretty oneline
+ use interactive adding
+ git add -i
+ links & resources
+ graphical clients
+
+
+
+ guides
+ get help
+ git - panduan ringkas
- git - the simple guide
+ git - panduan ringkas
membuat repositori baru
+ create a new repository
+ create a new directory, open it and perform a
git init
- untuk membuat repositori baru git.
+ to create a new git repository.
checkout repositori
+ checkout a repository
+ create a working copy of a local repository by running the command
git clone /path/to/repository
- bila servernya remote, perintahnya sebagai berikut
+ when using a remote server, your command will be
git clone username@host:/path/to/repository
alurkerja
+ workflow
Direktori Kerja yang berisi berkas sebenarnya.
- yang kedua adalah Index yang berfungsi sebagai "a staging area" (area antara)
- dan terakhir adalah HEAD yang merujuk pada "commit" terakhir.
+ your local repository consists of three "trees" maintained by git.
+ the first one is your Working Directory which holds the actual files.
+ the second one is the Index which acts as a staging area and
+ finally the HEAD which points to the last commit you've made.
menambahkan & commit
+ add & commit
+ You can propose changes (add it to the Index) using
git add <filename>
git add *
- Ini langkah pertama dalam alurkerja dasar git. Untuk benar-benar "commit" perubahan tsb, jalankan
+ This is the first step in the basic git workflow. To actually commit these changes use
git commit -m "Commit message"
- Sekarang file nya sudah ter "commit" ke HEAD, tapi belum ke repositori "remote".
+ Now the file is committed to the HEAD, but not in your remote repository yet.
comments
-Status API Training Shop Blog About
-© 2015 GitHub, Inc. Terms Privacy Security Contact
From 4ae1b26313f56a0468088b40a06dc3ec31c59ba7 Mon Sep 17 00:00:00 2001
From: Cipto Hadi git - the simple guide
မြန်မာ,
日本語,
中文,
- 한국어
- Vietnamese
+ 한국어,
+ Vietnamese,
Indonesian
please report issues on github
From 5112b8595ae7949de89e6df7aecc9cffc134068a Mon Sep 17 00:00:00 2001
From: Cipto Hadi alurkerja
menambahkan & commit
+ menambahkan & mengikat (commit)
+ Anda dapat menambahkan perubahan (menambahkan ke Index) menggunakan
git add <filename>
git add *
- Ini langkah pertama dalam alurkerja dasar git. Untuk benar-benar "commit" perubahan tsb, jalankan
+ Ini langkah pertama dalam alurkerja dasar git. Untuk benar-benar mengikat perubahan tsb, jalankan
git commit -m "Commit message"
- Sekarang file nya sudah ter "commit" ke HEAD, tapi belum ke repositori "remote".
+ Sekarang file nya sudah ter terikat ke HEAD, tapi belum ke repositori "remote".
git - panduan ringkas
myanmar,
mandarin,
jepang,
- korea
- vietnam
+ korea,
+ vietnam,
indonesia
silahkan laporkan isu di github
@@ -205,7 +205,7 @@ replace local changes
useful hints
+ petunjuk yang berguna
gitk
@@ -219,8 +219,8 @@ useful hints
links & resources
- graphical clients
+ Link & Sumberdaya
+ Progam Git Grafis
- graphical clients
guides
+ Panduan
-
- get help
+ Cari Bantuan
comments
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
-
+
menambahkan & mengikat (commit)
pushing changes
+ mengirim perubahan
+ Sekarang perubahannya di HEAD dari repositori lokal. Untuk mengirimnya ke repositori remote, jalankan
git push origin master
- Change master to whatever branch you want to push your changes to.
+ Ganti master dengan cabang yang dikehendaki.
- If you have not cloned an existing repository and want to connect your repository to a remote server, you need to add it with
+ Jika sebelumnya Anda tidak mengclone repositori remote dan ingin menghubungkan repositori lokal ke server remote, jalankan perintah
git remote add origin <server>
- Now you are able to push your changes to the selected remote server
+ Sekarang Anda sudah dapat mengirim perubaha ke server remote
mengirim perubahan
Jika sebelumnya Anda tidak mengclone repositori remote dan ingin menghubungkan repositori lokal ke server remote, jalankan perintah
git remote add origin <server>
- Sekarang Anda sudah dapat mengirim perubaha ke server remote
+ Sekarang Anda sudah dapat mengirim perubahan ke server remote
- Branches are used to develop features isolated from each other. The master branch is the "default" branch when you create a repository. Use other branches for development and merge them back to the master branch upon completion. + Cabang digunakan untuk mengembangkan fitur suatu proyek perangkat lunak, dimana antar cabang terisolasi satu sama lain. Cabang master adalah cabang "default" saat membuat repositori baru. Gunakan cabang lain untuk pengembangan, kemudian leburkan ke cabang master setelah selesai.
- create a new branch named "feature_x" and switch to it using
+ buat cabang baru bernama "feature_x" dan pindah ke sana dengan perintah
git checkout -b feature_x
- switch back to master
+ pindah kembali ke master
git checkout master
- and delete the branch again
+ dan hapus cabang tsb
git branch -d feature_x
- a branch is not available to others unless you push the branch to your remote repository
+ cabang tak kan terakses umum kecuali jika dikirim ke repositori publik remote dg perintah
git push origin <branch>
git checkout mastergit branch -d feature_xgit push origin <branch>
- to update your local repository to the newest commit, execute
+ untuk memperbarui repositori lokal sesuai dengan commit terakhir dari repositori remote, jalankan
git pull
- in your working directory to fetch and merge remote changes.
- to merge another branch into your active branch (e.g. master), use
+ di direktori kerja untuk mengambil dan melebur perubahannya.
+ untuk melebur cabang lain ke cabang aktif (mis. master), gunakan
git merge <branch>
- in both cases git tries to auto-merge changes. Unfortunately, this is not always possible and results in conflicts.
- You are responsible to merge those conflicts
- manually by editing the files shown by git. After changing, you need to mark them as merged with
+ dalam kedua kasus tersebut, git berusaha melebur secara otomatis. Sayangya, ini tidak selalu berhasil yang akibatnya menimbulkan konflik.
+ Anda harus secara manual menyelesaikan terlebih dahulu konflik tsb
+ dgn mengedit berkas yg ditunjukkan git. Setelah dirubah, Anda harus menambahkannya dgn perintah
git add <filename>
- before merging changes, you can also preview them by using
+ sebelum melebur perubahannya, Anda juga bisa mem-preview perbedaannya dengan
git diff <source_branch> <target_branch>
- it's recommended to create tags for software releases. this is a known concept, which also exists in SVN. You can create a new tag named 1.0.0 by executing
+ Untuk merelease software disarankan untuk menandainya terlebih dahulu. Di git konsep ini sudah dikenal umum, termasuk juga di SVN. Anda dapat membuat tag bernama 1.0.0 dgn perintah
git tag 1.0.0 1b2e1d63ff
- the 1b2e1d63ff stands for the first 10 characters of the commit id you want to reference with your tag. You can get the commit id by looking at the...
+ 1b2e1d63ff merupakan 10 karakter pertama dari id commit yg ingin Anda rujuk.
- in its simplest form, you can study repository history using..
+ Dalam bentuk sederhana, Anda bisa melihat riwayat repositori dengan ..
git log
- You can add a lot of parameters to make the log look like what you want. To see only the commits of a certain author:
+ Anda menambahkan parameter untuk menyaring info riwayat tsb. Untuk melihat riwayat dari author tertentu:
git log --author=bob
- To see a very compressed log where each commit is one line:
+ Untuk versi ringkas dr riwayat, dimana tiap commit dalam satu baris :
git log --pretty=oneline
- Or maybe you want to see an ASCII art tree of all the branches, decorated with the names of tags and branches:
+ Atau mungkin Anda ingin melihat dalam bentuk pohon seni ASCII dari seluruh cabang, dihiasi dgn nama tag dan cabang:
git log --graph --oneline --decorate --all
- See only which files have changed:
+ Hanya melihat berkas-berkas yang berubah saja:
git log --name-status
- These are just a few of the possible parameters you can use. For more, see
+ Masih ada parameter yang lain. Lebih lengkapnya, jalankan
git log --help
- In case you did something wrong (which for sure never happens ;) you can replace local changes using the command
+ Jika Anda melakukan suatu kesalahan dan ingin mengganti perubahan lokal tsb dgn
git checkout -- <filename>
- this replaces the changes in your working tree with the last content in HEAD. Changes already added to the index, as well as new files, will be kept.
+ hal ini akan mengganti perubahan di direktori kerja dgn isi terakhir di HEAD. Perubahan yang sudah ditambahkan ke Index, akan tetap terjaga.
- If you instead want to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it like this
+ Jika Anda ingin membuang semua "perubahan dan commit lokal", mengambil riwayat terakhir dari server remote dan merujukkan cabang master lokal kepadanya, maka jalankan
git fetch origin
git reset --hard origin/master
comments
+ + + +