* In git bash , use "git clone remote local".This will clone a git repository called local. As an alternative ,You can also [[Orion/How_Tos/Working_with_git#Cloning_a_Git_repository|clone]] the local in Orion.

* In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.

* In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.

−

* In Orion , create two folders and link the full path of "remote" and "local" , respectively.

+

* In Orion , create two folders and [[Orion/How Tos/Install Orion on Localhost#Linking_to_existing_content|link]] the full path of "remote" and "local" , respectively.

== Both repository modified the same file ==

== Both repository modified the same file ==

−

* In remote folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)

+

* In Orion navigator at the '''remote''' folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)

line1

line1

line2

line2

Line 23:

Line 23:

line6

line6

line7

line7

−

* In Orion navigator , click on [more]->[git status] from the '''remote''' folder action. This brings you to the git status page.

+

* In Orion navigator at the '''remote''' folder, click on [more]->[git status] action. This brings up the git status page on remote.

* In git status page , stage file1.txt and commit it.

* In git status page , stage file1.txt and commit it.

−

* Come back to navigator page , click on [more]->[git remote] from the '''local''' folder action. This brings you to the git remote page.

+

* Come back to navigator page at the '''local''' folder, click on [more]->[git remote] action. This brings up the git remote page on local.

−

* In git remote page ,click on ''Fetch'' action on the top left corner of the page. You will see file1.txt is fetched.

+

* In git remote page ,click on ''Fetch'' action at the top left corner of the page. You will see file1.txt is fetched.

Contents

Resolve merge conflicts

The section describes how to resolve conflicts resulted from git merge , by using Orion git status and writable compare editor pages.
Please note that the expected result from the test cases only applies in Orion M7. A better solution(possibly 3-way compare) will be addressed after M7 and the same steps will apply.
There are 3 test cases in this section. The test cases assume that you have a remote Git repository and a cloned local Git repository.
When both of the repositories modify the same file at the same places , conflicts may happen during merge and manual modification is needed to resolve them.
Before executing the test cases you want to simulate a remote Git repository and prepare a local clone from it:

In your server's local drive , find a folder and use Git Bash there.

In Git bash , use "git init remote". This will create an empty git repository called remote.

In git bash , use "git clone remote local".This will clone a git repository called local. As an alternative ,You can also clone the local in Orion.

In git bash , type "cd remote" , then "git config receive.denycurrentbranch ignore". This will allow you to push from local to remote.

In Orion , create two folders and link the full path of "remote" and "local" , respectively.

Both repository modified the same file

In Orion navigator at the remote folder , create file1.txt and put content like below (the content is very simple just to address the pattern but you can add your variation if you think so)

line1
line2
line3
line4
line5
line6
line7

In Orion navigator at the remote folder, click on [more]->[git status] action. This brings up the git status page on remote.

In git status page , stage file1.txt and commit it.

Come back to navigator page at the local folder, click on [more]->[git remote] action. This brings up the git remote page on local.

In git remote page ,click on Fetch action at the top left corner of the page. You will see file1.txt is fetched.

Click on Merge action , file1.txt is pulled into local folder.

Come back to navigator page at remote folder , click on file1.txt. This brings up the Orion editor.

In the editor , change the file1.txt to something like below , and save.