Introduction and operations\commands in GitHub

Amey SangareAmey Sangare
2 min read

GitHub is a ๐ŸŒ web-based platform that provides version control and collaboration tools for software development projects. GitHub is used to help you streamline your development process and work together efficiently.

๐Ÿ—‚๏ธ Version Control: At the heart of GitHub is Git, a distributed version control system. With Git, you can track changes to your code, collaborate with others, and manage different versions of your project.

๐Ÿš€ Continuous Integration & Deployment (CI/CD): GitHub Actions empowers you to automate your software development workflows. Build, test, and deploy your applications effortlessly with continuous integration and deployment. ๐Ÿ”„

GitHub Operations

  1. git clone [repository URL]: Creates a local copy of a remote repository on your machine.

  2. git init: Initializes a new Git repository in the current directory.

  3. git add [file]: Adds a file to the staging area, preparing it for the next commit.

  4. git commit -m "commit message": Commits the changes in the staging area with a descriptive message.

  5. git push: Uploads local commits to the remote repository.

  6. git pull: Fetches and merges changes from the remote repository into the local repository.

  7. git status: Shows the current status of your local repository, including the files with changes and the ones staged for commit.

  8. git branch: Lists all branches in the repository and indicates the current branch with an asterisk.

  9. git checkout [branch]: Switches to the specified branch.

  10. git merge [branch]: Merges the specified branch into the current branch.

  11. git remote add origin [repository URL]: Links your local repository to a remote repository on GitHub.

  12. git remote -v: Lists the remote repositories associated with your local repository.

  13. git log: Displays the commit history, showing the author, date, and commit messages.

  14. git reset [file]: Removes a file from the staging area without undoing the changes.

  15. git stash: Temporarily saves changes that are not ready for commit.

1
Subscribe to my newsletter

Read articles from Amey Sangare directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Amey Sangare
Amey Sangare