Skip to content

This is repository for teaching material of basic git for collaboration and contribution to the open source

Notifications You must be signed in to change notification settings

Lyurhndz/preparation-git

 
 

Repository files navigation

PREPARATION GIT

This is a repository for teaching material of git basic for collaboration and contribution to the open-source

Learning outcome :

  • Understand how to start collaboration in the open-source repository
  • Understand basic step-by-step collaboration in the open-source repository

Check your requirements!

What should you do ?

  • Fork this repository, you will see on top of page

  • Clone the repository to your device, you can use git bash git clone <repo_url>

  • Create a new branch, then checkout to the new branch that has been created. Use git checkout -b <branch_name> or git branch <branch_name> then follow by git switch <branch_name>.

  • Start making a folder and some files in the repository. Example :

    image

    You can use windows file explorer directly to create a folder or use linux commands like mkdir and echo.

  • Then, commit the file1 and file2 in the first commit, then commit file3 in the second commit. First of all, move the file into the staging area using git add <file_name>, after that you can commit the change using git commit -m "commit message". (Best practice: use conventional commit message to improve readability)

  • So in the end we will have 2 commits, 1 commit for file1 and file2, 1 commit for file3.

  • Push the commit into your branch using git push -u origin <branch_name>.

  • Check the repository in the github, then choose compare pull & request. If you encounter a compare and pull request button doesn't appear. Ask the mentor immediately.

  • Fill the some details in the pull & request section then finish it!

End of section

If you find another problem with your git, feel free to ask the mentor.

Another resource to learn git individually

About

This is repository for teaching material of basic git for collaboration and contribution to the open source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published