- सेटअप (व्यवस्था)
- कॉन्फ़िगरेशन फ़ाइलें
- निर्माण
- स्थानीय परिवर्तन
- खोज
- कमिट इतिहास
- चाल और नाम बदलें
- शाखाएं और टैग
- अद्यतन और प्रकाशित करें
- मर्ज और रिबेस
- पूर्ववत
git config --listgit config --local --listgit config --global --listgit config --system --listgit config --global user.name “[firstname lastname]”git config --global user.email “[valid-email]”git config --global color.ui autogit config --global core.editor vi<repo>/.git/config~/.gitconfig/etc/gitconfigये करने के दो तरीके है:
एस.एस.एच. के माध्यम से:
git clone ssh://user@domain.com/repo.gitएचटीटीपी के माध्यम से:
git clone http://domain.com/user/repo.gitgit initgit init <directory>git statusgit diffgit add .git add -p <file>git commit -agit commitgit commit -m 'message here'git commit --date="`date --date='n day ago'`" -am "Commit Message"प्रकाशित कमिट का संशोधन मत करें!
git commit --amendप्रकाशित कमिट का संशोधन मत करें!
git commit --amend --no-editGIT_COMMITTER_DATE="date" git commit --amendgit commit --amend --date="date"git stash
git checkout branch2
git stash popgit stash apply- {स्टैश_संख्या}
git stash listसे प्राप्त किया जा सकता है
git stash apply stash@{stash_number}git stash dropgit grep "hello"git grep "hello" v2.5git loggit log --onelinegit log --author="username"git log -p <file>git blame <file>git log --oneline <origin/master>..<remote/master> --left-rightgit reflog showgit reflog deleteIndex.txt को Index.html में बदलें
git mv Index.txt Index.htmlgit branchgit checkout <branch>git checkout -b <new-branch>git checkout <commit-hash> -b <new_branch_name>git branch <new-branch>git branch --track <new-branch> <remote-branch>git branch -d <branch>git branch -m <new_branch_name>आप मर्ज ना किए गए बदलाव खो देंगे!
git branch -D <branch>git tag <tag-name>git tag -a <tag-name>git tag <tag-name> -am 'message here'git taggit tag -ngit remote -vgit remote show <remote>git remote add <remote> <url>git remote rename <remote> <new_remote>git remote rm <remote>नोट: git remote rm सर्वर से दूरस्थ रिपॉजिटरी को डिलीट नहीं करता है। यह केवल आपके स्थानीय रिपॉजिटरी से रिमोट और उसके संदर्भों को हटा देता है।
git fetch <remote>git remote pull <remote> <url>git pull origin mastergit pull --rebase <remote> <branch>git push remote <remote> <branch>git push <remote> :<branch> (since Git v1.5.0)या
git push <remote> --delete <branch> (since Git v1.7.0)git push --tagsgit merge <branch>प्रकाशित कमिट का संशोधन मत करें!
git rebase <branch>git rebase --abortgit rebase --continuegit mergetoolसुलझाया के रूप में मैन्युअल निशान फ़ाइल (हल करने के बाद) संघर्षों और हल करने के लिए अपने संपादक का उपयोग करें:
git add <resolved-file>git rm <resolved-file>git rebase -i <commit-just-before-first>git reset --hard HEADgit reset HEADgit checkout HEAD <file>git revert <commit>git reset --hard <commit>अपने HEAD पॉइंटर को पिछली प्रतिबद्धताओं पर रीसेट करें और सभी परिवर्तनों को बिना किसी बदलाव के संरक्षित करें:
git reset <commit>git reset --keep <commit>git reset --hard <remote/branch> e.g., upstream/master, origin/my-featuregit rm -r --cached .
git add .
git commit -m "remove xyz file"