Replies: 3 comments 2 replies
-
Updated the readme with a pull command. Awaiting merge approval. |
Beta Was this translation helpful? Give feedback.
-
These are some useful git commands:Login to git through commands: Commands to initiate git repository git status git branch branch_name git checkout -b branch_name git checkout branch_name git add . OR git add file_name git commit -m "Small note about changes" git push --set-upstream origin branch_name git push git pull git pull origin git pull --rebase git merge branch_name git merge --abort git branch --merged git branch -d branch_name git branch -D branch_name git diff main..local_branch git stash git stash list git stash list -p git stash apply git stash pop git stash apply (stash reference number) git stash save "(description)" git stash drop stash@{n} git stash show git stash show -p git stash show -p stash@{n} alias graph=”git log --all --decorate --online --graph” git reset --hard origin/main git reset --hard HEAD^1 git merge-base branch1 branch2 git checkout -b branch_name f77c1384c3a966323ba6d642f8950a466e215acd git tag tag_name git push origin –tags git push origin tag_name git branch -m new_branch git branch -m old_branch new_branch git push origin :branch_name What if 2 or more persons working on the same file changed the same code. We need to resolve the conflicts, then commit and then push to git. ====================================================================================== |
Beta Was this translation helpful? Give feedback.
-
Discuss things related to GitHub here!
Beta Was this translation helpful? Give feedback.
All reactions