100 Days of DevOps: Day 26

  • Thread starter Thread starter Wycliffe A. Onyango
  • Start date Start date
W

Wycliffe A. Onyango

Guest

Updating Git Remote and Pushing Changes​


The xFusionCorp development team updated the project repository. A new remote needed to be added and the latest changes pushed to it. The task involved configuring the new remote, adding a file to the repository, and pushing the changes.

Steps Performed​

1. Navigate to the repository​


Code:
cd /usr/src/kodekloudrepos/official

2. Add the new remote​


Added a new remote named dev_official pointing to /opt/xfusioncorp_official.git:


Code:
git remote add dev_official /opt/xfusioncorp_official.git

Verify remotes:


Code:
git remote -v

Output confirms the new remote is configured:


Code:
dev_official    /opt/xfusioncorp_official.git (fetch)
dev_official    /opt/xfusioncorp_official.git (push)

3. Copy the required file into repository​


Copied /tmp/index.html into the working directory of the repo:


Code:
cp /tmp/index.html .

4. Add and commit the file​


Staged and committed the new file:


Code:
git add index.html
git commit -m "Added index.html file"

5. Push the master branch to the new remote​


Code:
git push dev_official master

Notes​

  • If you want dev_official to act as the default remote for pushes, run:

Code:
  git push -u dev_official master

Continue reading...
 


Join 𝕋𝕄𝕋 on Telegram
Channel PREVIEW:
Back
Top