GIT COMMAND #coderslife
1. git init: Initializes a new Git repository in the current directory.
2. git clone repo url – Clones an existing repository from a remote server to your local machine.
3. git status: Displays the state of the working directory and the staging area.
4. git add file Stages changes (adds files to the staging area).
5. git commit -m “message”: Records the staged changes with a message describing what was done.
6. git push origin branch : Pushes committed changes to the remote repository’s specified branch.
7. git pull: Fetches and integrates changes from the remote repository to your local branch.
8. git branch: Lists all local branches in the repository.
9. git checkout branch : Switches to the specified branch.
10. git merge branch : Merges changes from the specified branch into the current branch.
11. git log: Shows the commit history for the repository.
12. git diff: Displays differences between commits, branches, or working directories.
13. git stash: Temporarily stores changes that are not ready to be committed.
14. git reset :Resets the current branch to a specific commit, optionally keeping or discarding changes.
15. git remote add origin : Adds a remote repository reference to your local repository.
These commands are the foundation of working with Git, helping you manage and collaborate on code efficiently.
#coding #programming #programmer #python #developer #javascript #code #coder #technology #html #computerscience #codinglife #java #webdeveloper #tech #webdevelopment #css #software #softwaredeveloper #webdesign #linux #programmers #codingisfun #softwareengineer #php #programmingmemes #programminglife #machinelearning #development #hacking
by Pooja Mishra
linux foundation