mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 13:35:44 +01:00
Merged in feature/merge_conflictResolution (pull request #126)
Feature/merge conflictResolution
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
//@flow
|
||||
import React from "react";
|
||||
import type { Repository } from "@scm-manager/ui-types";
|
||||
import { translate } from "react-i18next";
|
||||
|
||||
type Props = {
|
||||
repository: Repository,
|
||||
target: string,
|
||||
source: string,
|
||||
t: string => string
|
||||
};
|
||||
|
||||
class GitMergeInformation extends React.Component<Props> {
|
||||
render() {
|
||||
const { source, target, t } = this.props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h4>{t("scm-git-plugin.information.merge.heading")}</h4>
|
||||
{t("scm-git-plugin.information.merge.checkout")}
|
||||
<pre>
|
||||
<code>git checkout {target}</code>
|
||||
</pre>
|
||||
{t("scm-git-plugin.information.merge.update")}
|
||||
<pre>
|
||||
<code>
|
||||
git pull
|
||||
</code>
|
||||
</pre>
|
||||
{t("scm-git-plugin.information.merge.merge")}
|
||||
<pre>
|
||||
<code>
|
||||
git merge {source}
|
||||
</code>
|
||||
</pre>
|
||||
{t("scm-git-plugin.information.merge.resolve")}
|
||||
<pre>
|
||||
<code>
|
||||
git add <conflict file>
|
||||
</code>
|
||||
</pre>
|
||||
{t("scm-git-plugin.information.merge.commit")}
|
||||
<pre>
|
||||
<code>
|
||||
git commit -m "Merge {source} into {target}"
|
||||
</code>
|
||||
</pre>
|
||||
{t("scm-git-plugin.information.merge.push")}
|
||||
<pre>
|
||||
<code>
|
||||
git push
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default translate("plugins")(GitMergeInformation);
|
||||
@@ -5,6 +5,7 @@ import GitAvatar from "./GitAvatar";
|
||||
|
||||
import { ConfigurationBinder as cfgBinder } from "@scm-manager/ui-components";
|
||||
import GitGlobalConfiguration from "./GitGlobalConfiguration";
|
||||
import GitMergeInformation from "./GitMergeInformation";
|
||||
|
||||
// repository
|
||||
|
||||
@@ -13,6 +14,7 @@ const gitPredicate = (props: Object) => {
|
||||
};
|
||||
|
||||
binder.bind("repos.repository-details.information", ProtocolInformation, gitPredicate);
|
||||
binder.bind("repos.repository-merge.information", GitMergeInformation, gitPredicate);
|
||||
binder.bind("repos.repository-avatar", GitAvatar, gitPredicate);
|
||||
|
||||
// global config
|
||||
|
||||
@@ -3,7 +3,16 @@
|
||||
"information": {
|
||||
"clone" : "Clone the repository",
|
||||
"create" : "Create a new repository",
|
||||
"replace" : "Push an existing repository"
|
||||
"replace" : "Push an existing repository",
|
||||
"merge": {
|
||||
"heading": "How to merge source branch into target branch",
|
||||
"checkout": "1. Make sure your workspace is clean and checkout target branch",
|
||||
"update": "2. Update workspace",
|
||||
"merge": "3. Merge source branch",
|
||||
"resolve": "4. Resolve merge conflicts and add corrected files to index",
|
||||
"commit": "5. Commit",
|
||||
"push": "6. Push your merge"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"link": "Git",
|
||||
|
||||
Reference in New Issue
Block a user