Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : Replace 'checkout master' with 'git checkout master',which is a common mistake beginners makes #1387

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7d0ceb3
feat : replace origin/main to 'origin main' in 'git push origin/main'
ryudonghyun123 Jul 7, 2023
f4395a7
feat add git merge space to slash
choiinju Jul 7, 2023
a6189b6
feat : replace origin/main to 'origin main' in 'git push origin/main'new
ryudonghyun123 Jul 7, 2023
527dfc8
Merge pull request #1 from jaehyeonpy/new/git-merge-space-to-slash-mi…
jaehyeonpy Jul 7, 2023
7698143
fix : remove codes related to logging
ryudonghyun123 Jul 7, 2023
ab23696
Merge pull request #3 from jaehyeonpy/new/git-push-origin-main-slash-…
jaehyeonpy Jul 7, 2023
cc22374
chore: improve readability
jaehyeonpy Jul 7, 2023
4041dd1
Merge pull request #4 from jaehyeonpy/chore/improve-readability
jaehyeonpy Jul 7, 2023
f1a12f7
chore : add read me file
choiinju Jul 9, 2023
2753866
Merge remote-tracking branch 'origin/master' into update-readme-about…
choiinju Jul 9, 2023
630eb4e
feat : command add -> git add -A
choiinju Jul 9, 2023
a973fba
feat : fucntion git add -a -> -A
choiinju Jul 9, 2023
a8cf966
feat : Replace 'init' with 'git init',which is a common mistake begin…
ryudonghyun123 Jul 10, 2023
5fb5049
Merge pull request #5 from jaehyeonpy/update-readme-about-git_merge_m…
jaehyeonpy Jul 10, 2023
2e5adb0
Merge pull request #6 from jaehyeonpy/git-add-forgot_git-to-add_all
jaehyeonpy Jul 10, 2023
b57ba98
Merge pull request #7 from jaehyeonpy/git_add_-a_-A
jaehyeonpy Jul 10, 2023
5f1b4b6
Merge pull request #8 from jaehyeonpy/new/git-init-no-git
jaehyeonpy Jul 10, 2023
44d53d4
feat : Replace 'commit' with 'git commit',which is a common mistake b…
ryudonghyun123 Jul 10, 2023
206616c
Merge remote-tracking branch 'origin/master' into new/git-commit-no-git
ryudonghyun123 Jul 10, 2023
aca3fe1
feat : Replace 'status' with 'git status',which is a common mistake b…
ryudonghyun123 Jul 10, 2023
31056fc
feat : Replace 'checkout master' with 'git checkout master',which is …
ryudonghyun123 Jul 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var/
*.egg-info/
.installed.cfg
*.egg
venv/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ following rules are enabled by default:
* `yarn_command_not_found` – fixes misspelled `yarn` commands;
* `yarn_command_replaced` – fixes replaced `yarn` commands;
* `yarn_help` – makes it easier to open `yarn` documentation;
* `git_merge_mistake` – fixes slash mistake in git merge;

##### [Back to Contents](#contents)

Expand Down
11 changes: 11 additions & 0 deletions thefuck/rules/git-checkout-master-no-git
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def match(command):

return (
command.script == "checkout master"
)




def get_new_command(command):
return (command.script.replace("checkout master","git checkout master",1))
Empty file.
11 changes: 11 additions & 0 deletions thefuck/rules/git-status-no-git.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def match(command):

return (
command.script == "status"
)




def get_new_command(command):
return (command.script.replace("status","git status",1))
6 changes: 6 additions & 0 deletions thefuck/rules/git_add_-a_-A.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def match(command):
return command.script == 'git add -a'


def get_new_command(command):
return 'git add -A'
6 changes: 6 additions & 0 deletions thefuck/rules/git_add_forgot_git.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def match(command):
return command.script == 'add'


def get_new_command(command):
return 'git add -A'
11 changes: 11 additions & 0 deletions thefuck/rules/git_init_no_git.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
def match(command):

return (
command.script == "init"
)




def get_new_command(command):
return (command.script.replace("init","git init",1))
8 changes: 8 additions & 0 deletions thefuck/rules/git_merge_originmain_mistake.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def match(command):
return (
command.script == 'git merge originmain'
)


def get_new_command(command):
return command.script.replace('originmain', 'origin/main', 1)
8 changes: 8 additions & 0 deletions thefuck/rules/git_push_origin_slash_main_mistake.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def match(command):
return (
command.script == "git push origin/main"
)


def get_new_command(command):
return command.script.replace("origin/main", "origin main", 1)