Skip to content

Instantly share code, notes, and snippets.

@rhovelz
Created December 6, 2019 15:26
Show Gist options
  • Save rhovelz/29a6ed33f19e8fd7bfd026e033557a3f to your computer and use it in GitHub Desktop.
Save rhovelz/29a6ed33f19e8fd7bfd026e033557a3f to your computer and use it in GitHub Desktop.
#Create local project
1. mkdir test-project
2. cd test-project
3. touch index.html
4. echo "#GIT FUNDAMENTAL BY CORSHINE" >> index.html
#create github repository
1. pada dashboard github, klik New
2. isi repository name "corshine-git-fundamental"
3. pilih public
4. README unchecked
5. Create repository
# Add remote repository pada local project
1. git init
2. git remote add origin https://github.com/xcorshinex/git-fundamentals-corshine.git
3. git add .
4. git commit -m "initial commit"
5. git push origin master
# Add new branch
1. git branch
2. git branch develop
3. git checkout develop
4. git branch
# Perhatikan nama branch
# merge branch
1. touch test.txt
2. echo "Corshine Ganteng" >> backdoor.txt
3. ls
4. git add .
5. git commit -m "add backdoor"
6. git push origin develop
7. git checkout master
8. ls
9. git merge develop
10. ls
- info : lihat isi branch jika sudah sama dengan branch develop lanjut ke step berikutnya
11. git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment