Is it possible to remote push from Git repo to Cloud repo, if the branch names are not same.
Want to push from GIT to CLOUD repo
Git repo branch name :- develop
Cloud repo branch name :- uat
Tried using
git push https://git.cloudmanager.xxx.com/XXXX develop:uat
Error :-
(non-fast-forward)
error: failed to push some refs to 'https://git.cloudmanager.xxx.com/xxxx '
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes.
Solved! Go to Solution.
Views
Replies
Total Likes
git push cloudurl develop:uat -f
uat branch will be overrided with develop branch code
Below commands should help you to push to remote
Git remote -v
Git remote add bitbucket https;//${USERID}:${PASSWORD}@bitbucket url
Git checkout -f branch name
Git remote -v
Git push bitbucket branch name:branch name
We want to remote push to AEM cloud repo
1.Clone your git repo on local machine
2. Add remote repo to it via remote add command "git remote add <remote-repo>"
3.Now checkout the branch from your git repo which you want to push and use below command to push in remote repo
git push <local_branch_name>:<desired_remote_branch_name>
Instead of doing it every time manually you should set up automated process to sync from your repo to Adobe Cloud Repo.
In these cases an automated synchronization process should be setup to ensure that Cloud Manager’s Git repository is always kept up to date. Depending on where the customer’s Git repository is hosted, a GitHub action or a continuous integration solution like Jenkins could be used to setup the automation. With an automation in place, every push to a customer owned Git repository can be automatically forwarded to Cloud Manager’s Git repository.
Refer here for more details - https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/managing-code/...
This will help you in long term. And you dont need to worry about manual steps.
We do not want to set up automated sync for this particular branch on Cloud, and this has to be updated only after specific sign-offs hence needs to be manual via command.
Any idea what could be going wrong here while we are trying to sync via git command
git push cloudurl develop:uat -f
uat branch will be overrided with develop branch code
Views
Likes
Replies