### Expanded Summary: Pertemuan 7 - Installasi & Command Dasar GIT
---
### π Introduction
This document provides an in-depth introduction to using Git for version control, from installation to mastering key commands. It is tailored for programmers who want to integrate Git into their workflows, with a focus on using Bitbucket as a repository hosting platform. Key areas covered include initializing repositories, managing commits, setting up secure connections with SSH keys, and using
---
### π Git Installation
Git is a widely used distributed version control system, and its installation is straightforward:
- Download: Access the official Git website ([git-scm.com](https://git-scm.com/downloads)) and download the appropriate installer for your operating system.
- Set Up Bitbucket Account: Create an account at [Bitbucket](https://bitbucket.org), prioritizing the use of professional emails for easier repository transfer in collaborative environments.
---
### π Setting Up SSH Keys for Secure Access
SSH keys enhance security by replacing traditional username-password authentication with cryptographic key pairs:
1. Generate SSH Key:
- Use
- Include a recognizable email and output filename (
2. Start SSH Agent:
- Activate the SSH agent with
3. Add Key to SSH Agent:
- Use
4. Configure SSH:
- Create or update the
5. Add Key to Bitbucket:
- Copy the content of the public key file (e.g.,
6. Test Connection:
- Confirm successful configuration with
---
### π Initializing and Managing Repositories
#### Setting Up a Local Repository
- Use
#### Configuring Global Variables
- Set global variables to identify the user across all repositories:
#### Adding Files
- Use
- Add all files:
- Add specific files:
#### Committing Changes
- Commit regularly after completing features or fixing bugs. The command:
allows you to include meaningful descriptions for future reference.
---
### π Connecting and Syncing with Remote Repositories
#### Setting Up a Remote Repository
- Connect the local repository to a remote one using:
#### Synchronizing Changes
- Pull updates before pushing to avoid conflicts:
- Push changes to the repository:
---
### π² Working with Branches
- Branching Basics: Branches help isolate features or experiments:
- Create a branch:
- Switch to a branch:
- Main Branch: The
---
### π Excluding Files with
The
- Sensitive files like
- Large or generated directories like
---
### π₯ Cloning Repositories and Viewing Changes
#### Cloning a Repository
- To replicate an existing repository, use:
#### Viewing Differences
- Inspect changes between your local files and the repository using:
---
---
### π Introduction
This document provides an in-depth introduction to using Git for version control, from installation to mastering key commands. It is tailored for programmers who want to integrate Git into their workflows, with a focus on using Bitbucket as a repository hosting platform. Key areas covered include initializing repositories, managing commits, setting up secure connections with SSH keys, and using
.gitignore to optimize repository management.---
### π Git Installation
Git is a widely used distributed version control system, and its installation is straightforward:
- Download: Access the official Git website ([git-scm.com](https://git-scm.com/downloads)) and download the appropriate installer for your operating system.
- Set Up Bitbucket Account: Create an account at [Bitbucket](https://bitbucket.org), prioritizing the use of professional emails for easier repository transfer in collaborative environments.
---
### π Setting Up SSH Keys for Secure Access
SSH keys enhance security by replacing traditional username-password authentication with cryptographic key pairs:
1. Generate SSH Key:
- Use
ssh-keygen with the -t ed25519 -b 4096 flag for strong encryption.- Include a recognizable email and output filename (
bitbucket_work). 2. Start SSH Agent:
- Activate the SSH agent with
eval $(ssh-agent). 3. Add Key to SSH Agent:
- Use
ssh-add to register the private key, ensuring seamless access during operations like git push. 4. Configure SSH:
- Create or update the
.ssh/config file with the following:
Host bitbucket.org
AddKeysToAgent yes
IdentityFile ~/.ssh/bitbucket_work
5. Add Key to Bitbucket:
- Copy the content of the public key file (e.g.,
bitbucket_work.pub) and add it to your Bitbucket account under SSH settings.6. Test Connection:
- Confirm successful configuration with
ssh -T git@bitbucket.org.---
### π Initializing and Managing Repositories
#### Setting Up a Local Repository
- Use
git init to create a repository in a project folder. This command sets up a .git directory to track version history. #### Configuring Global Variables
- Set global variables to identify the user across all repositories:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
#### Adding Files
- Use
git add to stage files for a commit:- Add all files:
git add .- Add specific files:
git add filename. #### Committing Changes
- Commit regularly after completing features or fixing bugs. The command:
git commit -m "Commit message"
allows you to include meaningful descriptions for future reference.
---
### π Connecting and Syncing with Remote Repositories
#### Setting Up a Remote Repository
- Connect the local repository to a remote one using:
git remote add origin git@bitbucket.org:username/repo_name.git
#### Synchronizing Changes
- Pull updates before pushing to avoid conflicts:
git pull origin master
- Push changes to the repository:
git push --set-upstream origin master
---
### π² Working with Branches
- Branching Basics: Branches help isolate features or experiments:
- Create a branch:
git branch branch_name- Switch to a branch:
git checkout branch_name. - Main Branch: The
master or main branch is typically used for live or production-ready code. ---
### π Excluding Files with
.gitignore The
.gitignore file prevents unnecessary files from being included in the repository. Common examples include: - Sensitive files like
config.php. - Large or generated directories like
uploads/ or vendor/. ---
### π₯ Cloning Repositories and Viewing Changes
#### Cloning a Repository
- To replicate an existing repository, use:
git clone https://username@bitbucket.org/username/repo_name.git
#### Viewing Differences
- Inspect changes between your local files and the repository using:
git diff
---
### π References and Resources
The document also links to comprehensive Git tutorials and setup guides:
- [Simplilearn Git Tutorial](https://www.simplilearn.com/tutorials/git-tutorial/git-tutorial-for-beginner).
- [Atlassian SSH Setup](https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-windows/).
---
### π Conclusion
This training material offers a comprehensive foundation in Git, focusing on practical steps and essential commands to manage code repositories effectively. From installing Git to advanced SSH configurations, it emphasizes the importance of structured workflows and secure practices in collaborative environments. The integration with Bitbucket ensures robust repository management for professional projects.
By following these instructions, programmers can enhance their version control proficiency and streamline collaborative development efforts.
The document also links to comprehensive Git tutorials and setup guides:
- [Simplilearn Git Tutorial](https://www.simplilearn.com/tutorials/git-tutorial/git-tutorial-for-beginner).
- [Atlassian SSH Setup](https://support.atlassian.com/bitbucket-cloud/docs/set-up-personal-ssh-keys-on-windows/).
---
### π Conclusion
This training material offers a comprehensive foundation in Git, focusing on practical steps and essential commands to manage code repositories effectively. From installing Git to advanced SSH configurations, it emphasizes the importance of structured workflows and secure practices in collaborative environments. The integration with Bitbucket ensures robust repository management for professional projects.
By following these instructions, programmers can enhance their version control proficiency and streamline collaborative development efforts.
Bitbucket
Bitbucket | Git solution for teams using Jira
Bitbucket Cloud is a Git-based code and CI/CD tool optimized for teams using Jira.
https://www.xda-developers.com/manage-your-finances-with-firefly-iii/
#finansial #uang #free #open #source #self #host #duit #atur
#finansial #uang #free #open #source #self #host #duit #atur
XDA
Manage your finances like a pro with a self-hosted Firefly III server
Tired of paying for premium accounting tools? You can host Firefly III on your home lab to keep track of your finances
https://youtu.be/vhaFcqvSOSU?si=0n5sYIqdfkDnwzW6
#ai #video #image #generator #free #open #source #hunyuan
#ai #video #image #generator #free #open #source #hunyuan
YouTube
This free AI video generator crushes everything
Hunyuan Video review & installation tutorial. Free, open-source, 100% uncensored! #ainews #ai #agi #singularity
Thanks to our sponsor Abacus AI. Try their ChatLLM platform here: http://chatllm.abacus.ai/?token=aisearch
Sources:
https://aivideo.hunyuan.tencent.com/β¦
Thanks to our sponsor Abacus AI. Try their ChatLLM platform here: http://chatllm.abacus.ai/?token=aisearch
Sources:
https://aivideo.hunyuan.tencent.com/β¦
https://www.youtube.com/live/k82RwXqZHY8?si=othbjr7rO2A8ie70
the most powerful tech event in the world 2025|
https://www.youtube.com/watch?v=fjO9GPh_vJI Β» everything ces 2025 in 12 minutes
#ces #2025 #ai #gaming #robot #robotics #pameran #teknologi
the most powerful tech event in the world 2025|
https://www.youtube.com/watch?v=fjO9GPh_vJI Β» everything ces 2025 in 12 minutes
#ces #2025 #ai #gaming #robot #robotics #pameran #teknologi
YouTube
NVIDIA CEO Jensen Huang Keynote at CES 2025
Join NVIDIA CEO Jensen Huang at CES on January 6 at 6:30 p.m. PT for an exclusive look at groundbreaking innovations in AI, gaming, robotics, and beyond.