File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes GIT 1.8.0 after insert commit comment how to return to CLI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "GIT 1.8.0 after insert commit comment how to return to CLI" Watch "GIT 1.8.0 after insert commit comment how to return to CLI" New topic
Author

GIT 1.8.0 after insert commit comment how to return to CLI

Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
GIT 1.8.0

after commands in CLI (COMMAND LINE)
cd C:/Users/User/Documents/PhoneGap/trnotes
git init
git status
git add .
git commit // AFTER INSERT COMMIT's COMMENT WHAT PRESS TO RETURN to CLI and comment done?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10263
    
168

Leonidas Savvides wrote:
git commit // AFTER INSERT COMMIT's COMMENT WHAT PRESS TO RETURN to CLI and comment done?


You can add a commit message inline. Like this:



[My Blog] [JavaRanch Journal]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42600
    
  65
And for all our sakes: KeepItDown


Ping & DNS - my free Android networking tools app
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
if put just

git commit

I get a prompt to insert a message with some comments below it... how this way add comments or return back to git cli?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

It depends on the OS, I think. But in cases where you are entering multi-line input, you can terminate input by typing a single line with a "." in it. Like so:


If that doesn't work, try hitting ENTER twice. Or Ctrl-D, which in Unix/Linux server as an end-of-input signal.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10263
    
168

It also depends on the editor that is configured for use with git. When a commit is missing a message, git opens up the configured editor where you are expected to write the commit message and close that editor when done. Take a look at the "core.editor" section here http://git-scm.com/book/en/Customizing-Git-Git-Configuration. I highly recommend reading all those chapters in "Pro Git" book. I've found it extremely useful when I was getting started with Git.
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
To: Tim Holloway

nothing happens,... using Git Bash CLI

SEE ATTACHMENT




[Thumbnail for git.jpg]

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

I think Git launched a copy of the vi editor program. Try hitting the "Esc" key, which should force the cursor to the bottom of the screen. Type ":wq" to write and quit. The semi-colon before the "w" is critical.

Note that you can select almost any editor program you want. Most version control systems use whatever the system environment variable named "EDITOR" is set to, and typically default to vi if it isn't set.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

For more info on git's editor usage: http://digitaldreamer.net/blog/2010/4/7/setting-default-editor-git-commit-messages/
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
worked thks
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
connectng 2 win PCs in local network
if in one pc(USER-HP) i have a repo:
cd C:/Users/User/Documents/PhoneGap/trnotes
To connect with another pc and clone (both installed git bash) this is correct:

git clone User-HP@192.168.10.11:C:/Users/User/Documents/PhoneGap/trnotes theProject

to create theProject in working folder git bash...(from USER-PC pc that accept the clone) (needed have .git this?)???


User-HP@192.168.10.11 ip of source pc

i must be able to write read from windows explorer to
User-HP@192.168.10.11:C:/Users/User/Documents/PhoneGap/trnotes

from USER-PC pc that accept the clone??? for success??
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 403
user pc source:USER-HP

user pc destination:USER-PC
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GIT 1.8.0 after insert commit comment how to return to CLI