Git Bitbucket Introduction
In this page:
git remote add origin https://bitbucket.org/user/repo.git
git clone https://bitbucket.org/user/repo.git
Bitbucket क्या है?
Bitbucket Atlassian की Git hosting service है, मुख्य रूप से issue tracking के लिए Jira और documentation के लिए Confluence के साथ अपने tight native integration के लिए जानी जाती है -- आप इसे एक local repository से exactly GitHub या GitLab जैसे ही एक remote की तरह connect करते हैं।
उदाहरण: What is Bitbucket?
git remote add origin https://bitbucket.org/user/repo.git
Bitbucket से Clone करना
Bitbucket से clone करना किसी दूसरे host जैसा ही काम करता है: repository page से HTTPS या SSH URL लें और git clone <url> चलाएँ, और Git automatically origin remote configure कर देता है।
उदाहरण: Cloning from Bitbucket
git clone https://bitbucket.org/user/repo.git
Remotes Manage करना
अगर किसी Bitbucket repository का URL बदलता है -- मान लीजिए, एक workspace rename के बाद -- git remote set-url origin <new-url> किसी local history को disturb किए बिना इसे update करता है; remote को खुद rename करना एक अलग, optional step है।
उदाहरण: Managing Remotes
git remote set-url origin https://bitbucket.org/newworkspace/repo.git
Bitbucket Pipelines के साथ काम करना
Bitbucket Pipelines Atlassian का built-in CI/CD tool है, जो आपकी repository में committed एक bitbucket-pipelines.yml file के through configure होता है, आपको automated test और build steps define करने देते हुए जो हर push पर चलते हैं।
उदाहरण: Working with Bitbucket Pipelines
echo "pipelines:\n default:\n - step:\n script:\n - npm test" > bitbucket-pipelines.yml
SSH Keys Set Up करना
SSH keys आपको हर push या pull पर password type किए बिना Bitbucket में authenticate करने देती हैं -- एक बार आप अपने Bitbucket account में अपनी public key add कर दें, ssh -T [email protected] confirm करता है कि connection सही से काम कर रहा है।
उदाहरण: Setting Up SSH Keys
ssh -T [email protected]
- किसी दूसरे host या workspace से copy किए गए URL से clone करना, ताकि
git cloneएक not-found या authentication error से fail हो। - पहले से
originexist करते हुएgit remote add origin ...से एक remote add करना, इसेgit remote set-url origin <new-url>से update करने के बजाय। - HTTPS पर अपना Bitbucket account password enter करना, जबकि इसे एक app password या access token चाहिए।
Chapter Quiz — Complete all 11 topics to unlock
0/11 topics done
Complete these topics first: