Thank you very much Dale. It worked perfectly. I really spent lot of time 
trying to figure out the issue. You are very helpful.:)

On Monday, 27 October 2014 19:29:31 UTC+5:30, Dale Worley wrote:
>
> > From: Trivender Ghangas <trivender...@gmail.com <javascript:>> 
> > 
> > I am trying to create an alias to simplify the process of cloning a 
> > repository with branches. I added alias in C:\Program 
> > Files\Git\etc\gitconfig 
> > 
> > gitconfig : https://www.dropbox.com/s/iumnqmkfk1ua8ty/gitconfig?dl=0 
> > 
> > I am getting error [attached error.png]. I am new to shell scripting. 
> > Please help me what is the reason for this error and how I can get 
> around 
> > it. 
>
> The error is "unexpected end of file".  (You should have transcribed 
> the command and the error into text.) 
>
> It took me a long while to understand this error when it happened to 
> me. 
>
> The critical item in the "bash" manual page is: 
>
>    RESERVED WORDS 
>        Reserved words are words that have a special meaning to the shell. 
>  The 
>        following words are recognized as reserved when unquoted and either 
> the 
>        first  word  of a simple command (see SHELL GRAMMAR below) or the 
> third 
>        word of a case or for command: 
>
>        ! case  do done elif else esac fi for function if in select then 
>  until 
>        while { } time [[ ]] 
>
> The "{" at the beginning of a function definition does not have to be 
> recognized as a reserved word -- it is recognized for its purpose 
> because it follows the "()". 
>
> But the "}" at the end of a function definition *does* have to be a 
> reserved word -- and so it must follow a newline or ";".  If it does 
> not, it is an ordinary word and will not have any of the grammatical 
> functions that are specified in the bash grammar. 
>
> You must change your definition to: 
>
>     cloneWithBranches() { git clone $1 $2; cd $2; git 
> checkout-remote-branches; git remote rm origin ; } 
>
> Dale 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to