Git
Commands/Steps
1. git init
(to initialize and is used once at the start of the project)
2. git remote origin (github link)
(used one time and set the link of github to "origin")
3. git add a.txt
(used to push a file here, a.txt)
4. git add .
(used to push all the files)
5.git commit -m "message"
(used to commit file to the repo , -m represent message and message should be in present continuous like "adding files")
6. git push origin
(used to push the files into the origin)
7. git commit -am "message"
(used to commit files similar to previous commit and merging both commits)
8. git branch
(shows the current branch the user is in)
9. git checkout -b "login" (creates a new branch named "login" and switches the branch to "login")
10. git checkout master/main
(switches the branch to main or master)
11. git pull origin (pulls the code from origin to current branch)
12. git clone (http://ajfoshgg)
(clones the project from the link of github)
13. code .
(Opens Vs code of the current clone of codes)
(used one time and set the link of github to "origin")
(used to push a file here, a.txt)
(used to push all the files)
(used to commit file to the repo , -m represent message and message should be in present continuous like "adding files")
(used to push the files into the origin)
(used to commit files similar to previous commit and merging both commits)
(shows the current branch the user is in)
(switches the branch to main or master)
(clones the project from the link of github)
(Opens Vs code of the current clone of codes)
Comments
Post a Comment