# Activity #5 Github Fundamentals

**Create step-by-step guide on how to use essential Git commands, including git commit, git pull, git push, git log, and etc.**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724524412921/3d054f71-ee95-4d98-bb4b-b105552dec12.png align="center")

**git clone** - This command is used to clone (download) a remote Git repository to your local machine. It creates a directory in your system with all the files and commits from the remote repository.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724518918208/53732442-1ea8-4516-b880-463b57b8c155.png align="center")

**git init** - This command initializes a new Git repository in your project directory. Run it in the root of your project. It creates a hidden .git folder, which contains all the information Git needs to track changes.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724520130988/6171bcc0-6a1e-404d-b60f-bf623b0fb280.png align="center")

**git status** - This command displays the status of your working directory and staging area. It shows which files are staged for the next commit, which are not tracked, and which have been modified.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724520264624/48241421-0e47-440e-94ee-52d6cdc52428.png align="center")

**git add .** - This command stages all the changes (new, modified, and deleted files) in your working directory to be included in the next commit.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724520478586/e6ce26f8-9945-4f72-b401-893dbae1cd10.png align="center")

**git commit** - This command commits the staged changes to the local repository with a message explaining what the commit does.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724518485021/27a33e9c-c602-4ff1-861d-d592ad9234d7.png align="center")

git branch

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724520586624/a2e256b5-27b3-4ed8-928a-117786dbf7e4.png align="center")

**git remote** - This command adds a remote repository (e.g., a GitHub repository) and assigns it the origin.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724520913276/1bf19383-8251-4279-98ce-45127c3141eb.png align="center")

**git push** - This command pushes your committed changes from your local repository to the remote repository on the main branch.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724524227100/4532045b-c841-44a9-b6cb-9c94bed489f0.png align="center")

**git pull** - This command pulls the latest changes from the remote repository to your local repository. It fetches the changes and merges them into your current branch.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1724521591783/e48aaf29-7a0f-4bb8-9968-e71fa31f55bb.png align="center")

**git log -** This command displays the commit history of your repository. It shows the hash, author, date, and message of each commit.

Github repository: [https://github.com/RodelDecio/Activity5.git](https://github.com/RodelDecio/Activity5.git)
