Issue - Sync Project Git Repository to Adobe Git || Manual Way | Community
Skip to main content
Tanika02
Level 7
June 21, 2023
Solved

Issue - Sync Project Git Repository to Adobe Git || Manual Way

  • June 21, 2023
  • 5 replies
  • 5097 views

Hello All,

 

What is the best way to Sync Project Git Repository to Adobe Git but the Manual Way?

 

I have been using below CMD commands but I have been facing issues (Unable to SYnc changes to Adobe GIT) - 

 

1. Checkout project GIT repository (develop Branch)

2. Add "adobe" remotes : 

git remote add adobe <repository_url>

3. Validate if the remotes have been added successfully : 

git remote -v

 4. Next, take the latest git pull from project git repository (develop Branch)

git pull origin develop

5.  Finally, pushing the changes to the adobe git.

git push adobe develop

 I get the success message but the changes have not been sync to Adobe GIT.

I even tried doing --force push to Adobe GIT, still the same issue.

 

Any help, would be appreciated! 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Tanika02

Thank you everyone for taking the time to check into this issue.

 

Doing git push adobe develop --force was able to resolve this issue!

 

5 replies

Himanshu_Jain
Community Advisor
Community Advisor
June 21, 2023

Hi @tanika02 

After taking pull from your project git you can use the following commands 


git remote add <remote-repo>
git push <local_branch_name>:<desired_remote_branch_name>

 

Thanks

Himanshu

Himanshu Jain
Tanika02
Tanika02Author
Level 7
June 21, 2023

@himanshu_jain  I am still facing the same issue.

Himanshu_Jain
Community Advisor
Community Advisor
June 21, 2023

Also you can try to take git pull from adobe git and try to do sync manually from local git .

 

 

Himanshu Jain
aanchal-sikka
Community Advisor
Community Advisor
June 21, 2023

Hello @tanika02 

 

Can you please try adding checkout between Step-4 & Step-5

 

git checkout develop

 It worked for me

Aanchal Sikka
Tanika02
Tanika02Author
Level 7
June 21, 2023

@aanchal-sikka  - 

 

Since I have the develop already checked out as part of step 1 itself. 

Do you still want me to add this step?

 

Also, do you want me to checkout the project GIT repo or the Adobe GIT repo?

aanchal-sikka
Community Advisor
Community Advisor
June 21, 2023

@tanika02 

 

I guess you are trying to push changes from project Git repo to Adobe git repo. So, we checkout project's develop and push to Adobe git

 

You are right on the note that its already checked out, apologies for the miss.

 

How are you checking, if the changes are pushed?

Aanchal Sikka
krishna_sai
Community Advisor
Community Advisor
June 21, 2023

Hi @tanika02 ,
Can you try 
git push adobe <local_branch_name>:<target_remote_branch>

Thanks,
Krishna

Tanika02
Tanika02Author
Level 7
June 21, 2023

@krishna_sai  - In my case, the source_branch & the target_branch is exactly the same.

 

Do you still want me to try the above method?

krishna_sai
Community Advisor
Community Advisor
June 21, 2023

yes can you try once

milind_bachani
Adobe Employee
Adobe Employee
June 21, 2023

Hi @tanika02 ,

 

The steps you have mentioned above look fine, do you see the fetch & push for all origins when you try :

 

git remote -v

 

 

Quick check on the git config, can you please check what is the value of 
remote.adobe.url  when you are trying to push ?

You can view following git configs using :

 

git config --get remote.adobe.url git config --get remote.origin.url

 

 

Check value of :

git config --get branch.<branchName_being_pushed>.remote


For example for develop branch value of :

 

branch.develop.remote=adobe

 

can only push to adobe git.

The value of last command for your branch being pushed should be adobe and NOT origin.

 

Best Regards,

Milind

Tanika02
Tanika02AuthorAccepted solution
Level 7
June 21, 2023

Thank you everyone for taking the time to check into this issue.

 

Doing git push adobe develop --force was able to resolve this issue!