feat: git memo

Signed-off-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
Corentin Thomasset 2020-06-21 18:42:19 +02:00
parent cb0e3f91db
commit 03e073d4f0
No known key found for this signature in database
GPG key ID: DBD997E935996158
3 changed files with 105 additions and 75 deletions

View file

@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Next ## Next
- [ui] condensed + colored sidenav - [ui] condensed + colored sidenav
- [feat] added [git memo](/#/git-memo)
## 1.3.0 ## 1.3.0
- [fix] [GithubContributors] ordered contributors by contribution count - [fix] [GithubContributors] ordered contributors by contribution count

View file

@ -38,7 +38,7 @@
<style lang="less" scoped> <style lang="less" scoped>
.memo-viewer { .memo-viewer {
column-gap: 30px; column-gap: 30px;
column-rule: 1px solid #373739; column-rule: 1px solid #37373961;
column-fill: auto; column-fill: auto;
} }

View file

@ -18,23 +18,6 @@
name: "GitMemo", name: "GitMemo",
data: () => ({ data: () => ({
tips: [ tips: [
{
section: 'Basic configuration',
child:[
{
text: 'Set the name that will be associated to every operation',
code: 'git config --global user.name "[nom]"'
},
{
text: 'Set the email address that will be associated to every operation',
code: 'git config --global user.email "[email]"'
},
{
text: 'Tell git to always push tags',
code: 'git config --global push.followTags true'
}
]
},
{ {
section: 'Get started', section: 'Get started',
child: [ child: [
@ -64,6 +47,44 @@
} }
] ]
}, },
{
section: 'Basic configuration',
child: [
{
text: 'Set the name that will be associated to every operation',
code: 'git config --global user.name "[nom]"'
},
{
text: 'Set the email address that will be associated to every operation',
code: 'git config --global user.email "[email]"'
},
{
text: 'Tell git to always push tags',
code: 'git config --global push.followTags true'
}
]
},
{
section: 'I\'ve made a mistake',
child: [
{
text: 'Change last commit message',
code: 'git commit --amend'
},
{
text: 'Undo most recent commit and keep changes',
code: 'git reset HEAD~1'
},
{
text: 'Undo most recent commit and get rid of changes',
code: 'git reset HEAD~1 --hard'
},
{
text: 'Reset branch to remote state',
code: 'git fetch origin\ngit reset --hard origin/[branch-name]'
}
]
},
{ {
section: 'Setup SSH', section: 'Setup SSH',
child: [ child: [
@ -93,26 +114,34 @@
] ]
}, },
{ {
section: 'I\'ve made a mistake', section: 'Merge and rebase',
child: [ child: [
{ {
text: 'Change last commit message', text: 'Merge a branch into the current',
code: 'git commit --amend' code: 'git merge [branch]'
}, },
{ {
text: 'Undo most recent commit and keep changes', text: 'Abort merge (conflicts)',
code: 'git reset HEAD~1' code: 'git merge --abort'
}, },
{ {
text: 'Undo most recent commit and get rid of changes', text: 'Continue merge after resolving conflicts',
code: 'git reset HEAD~1 --hard' code: 'git merge --continue'
}, },
{ {
text: 'Reset branch to remote state', text: 'Rebase a branch into the current',
code: 'git fetch origin\ngit reset --hard origin/[branch-name]' code: 'git rebase [branch]'
} },
{
text: 'Rebase merge (conflicts)',
code: 'git merge --abort'
},
{
text: 'Continue rebase after resolving conflicts',
code: 'git merge --continue'
},
] ]
} },
] ]
}), }),
components: { components: {