Introduction and operations\commands in GitHub


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
git clone [repository URL]
: Creates a local copy of a remote repository on your machine.git init
: Initializes a new Git repository in the current directory.git add [file]
: Adds a file to the staging area, preparing it for the next commit.git commit -m "commit message"
: Commits the changes in the staging area with a descriptive message.git push
: Uploads local commits to the remote repository.git pull
: Fetches and merges changes from the remote repository into the local repository.git status
: Shows the current status of your local repository, including the files with changes and the ones staged for commit.git branch
: Lists all branches in the repository and indicates the current branch with an asterisk.git checkout [branch]
: Switches to the specified branch.git merge [branch]
: Merges the specified branch into the current branch.git remote add origin [repository URL]
: Links your local repository to a remote repository on GitHub.git remote -v
: Lists the remote repositories associated with your local repository.git log
: Displays the commit history, showing the author, date, and commit messages.git reset [file]
: Removes a file from the staging area without undoing the changes.git stash
: Temporarily saves changes that are not ready for commit.
Subscribe to my newsletter
Read articles from Amey Sangare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
