3

i am getting error when i am trying to commit

i am getting error sh.exe: notepad: command not found please short out my problem Thanks

1
  • Is your problem related to github or notepad.exe? Commented Jan 15, 2014 at 8:37

2 Answers 2

1

For the commit to GitHub part, you need to add (if you have created an empty yourRepo on GitHub):

git config user.name yourGitHubUsername
git config user.email yourGitHubEmail
git add .
git commit -m "First commit"
git remote add origin https://[email protected]/yourAccount/yourRepo
git push -u origin master

If that fails because GitHub already created one commit when you initialized your "empty" repo (it can add by default a README.md and a .gitignore), do a:

git pull --rebase origin master
git push -u origin master

If you really have to call notepad from a mingw session, you can use this wrapper:

#!/bin/sh
'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar \
  -nosession -noPlugin "$(cygpath -w "$*")"

But remember you can use msysgit from a DOS session as well.

Sign up to request clarification or add additional context in comments.

18 Comments

w2hen i writ this line and enter i am getting errot sh.exe":remote:command not found
@Shakti did you type "git remote" or just "remote"? How did you launch your mingw session? Through Git? What version of Git did you install?
@Shakti that is not how git commands work: you type git xxxx, not xxxx.
in next section i typed $git push -u origin master i am getting following error
fatal:could not read username for 'github.com': No such file or directory
|
0

Seps: 1.git init 2. git status 3. git add . 4. git commit -a 5. git status

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.