Making a "git pull" in script

Jonas Korsgaard July 2, 2021

Im new to creating pipelines, so i hope you can help with my isse.

 

I have the following setup: RepoA and RepoB (where RepoB is a clone of RepoA)

When changes has been done to master on RepoB and im running the following pipelinescript at RepoB:

 

- git remote set-url origin https://${email}:${pass}@XYZ.git

- git push

 

master on RepoA is update, and that is what i would like it to do.

The script also contains:

 

- git remote set-url origin https://${email}:${pass}@XYZ.git

- git pull origin master

 

the result is:

From https://XYZ

* branch master -> FETCH_HEAD

+ 00b78e7...f524ece master -> origin/master (forced update)

Merge made by the 'recursive' strategy.

Views/TestSite.cshtml | 5 +-

Views/TestSite2.cshtml | 5 ++

...data-type__dd150f72f93b4e31a78cb3c3d5589586.uda | 12 +++++

...ment-type__a36a1df46ebd46739770fff072e5ef08.uda | 62 ++++++++++++++++++++++

.../template__db30e2dcdb1a4579960ee5a42f0d27e4.uda | 16 ++++++

5 files changed, 99 insertions(+), 1 deletion(-)

create mode 100644 Views/TestSite2.cshtml

create mode 100644 data/revision/data-type__dd150f72f93b4e31a78cb3c3d5589586.uda

create mode 100644 data/revision/document-type__a36a1df46ebd46739770fff072e5ef08.uda

create mode 100644 data/revision/template__db30e2dcdb1a4579960ee5a42f0d27e4.uda

 

Now i expect RepoB's master to be updated, but it doesn't.

Can you explain why the 'push' part works fine, but the 'pull' part doesn't?

What should i do to make the 'pull' part work?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events