Expand my Community achievements bar.

SOLVED

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

Avatar

Community Advisor

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! 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

 

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

 

View solution in original post

14 Replies

Avatar

Community Advisor

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

Avatar

Community Advisor

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

 

 

Himanshu Jain

Avatar

Community Advisor

Hello @Tanika02 

 

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

 

git checkout develop

 It worked for me


Aanchal Sikka

Avatar

Community Advisor

@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?

Avatar

Community Advisor

@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

Avatar

Community Advisor

@aanchal-sikka  - I am actually looking for ways to validate if my changes have been pushed to ADOBE Git.

 

But for now once the changes have been pushed to Adobe GIT via CMD Terminal. I rely on the success message.

Avatar

Community Advisor

@Tanika02 

 

I would suggest to use SourceTree.

It has a nice UI, by which you can validate the status of:

  • checkout branch
  • Adobe git
  • Project git

Example: the below screenshot shows that all 3 are in Sync. Much better than depending on deployment, then debugging, if code is missing or config.

aanchalsikka_0-1687339952022.png

 


Aanchal Sikka

Avatar

Community Advisor

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

Thanks,
Krishna

Avatar

Community Advisor

@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?

Avatar

Community Advisor

@krishna_sai  - Once I run the above command, it say : Everything up-to-date but post deployment the changes are not available in the Author instance Itself.

Avatar

Employee Advisor

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

Avatar

Correct answer by
Community Advisor

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

 

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