.bat file creation!

20 views
Skip to first unread message

vr63...@gmail.com

unread,
Sep 28, 2016, 5:18:47 AM9/28/16
to Git for Windows
Hi Experts,

I just want to create a batch file which will prompt for movement of multiple code files / commit to origin / creation of tag in a branch  / and push to origin.

Need your valuable input on same.

Regards,
Vikram

Konstantin Khomoutov

unread,
Sep 28, 2016, 7:52:45 AM9/28/16
to vr63...@gmail.com, Git for Windows
On Wed, 28 Sep 2016 02:18:47 -0700 (PDT)
vr63...@gmail.com wrote:

> I just want to create a batch file which will prompt for movement of
> multiple code files / commit to origin / creation of tag in a
> branch / and push to origin.
>
> Need your valuable input on same.

Please consider reading http://whathaveyoutried.com and then coming
back with your question refined approptiately.

Please also note two assorted things:

* That "prompt" verb is confusing to me: is it intended to prompt the
user to pick a single action of the list you enumerated and then
perform it on some _predefined_ files / branches / tags etc or is it
supposed to let the user pick individual files / select a branch /
input the name of a tag to create etc?

I'm asking because while selecting a single action from a list
could possibly be done using the cmd.exe's batch command language
(though I'm not really sure) the more advanced stuff will definitely
not be possible: the language is too weak to deal with such a task.

You might have better success leveraging the Bash POSIX shell which
cames bundled with Git for Windows. You might just go and look at how
the `git add -i` mode is implemented as AFAIR it's implemented as
a shell script.

Or, since you apparently only target Windows audience, I'd just use
some other tool for the job -- such as Powershell.

And finally -- if interactivity is needed -- I'd consider writing a
GUI program indeed. GfW comes packed with `git gui` and `gitk` which
are written in Tcl/Tk -- a very easy programming lanugage with
built-in cross-platform GUI stack. Since Tcl/Tk is bundled with GfW
as well, using it is a matter of working through a tutorial and
experimenting a bit.

* The MinGW project is dormant for a long time because since Git 2.x
came into existence, the development had switched to the successor
project "Git for Windows" which has a set of separate repositories,
issue trackers and a separate mailing list.

Please see https://git-for-windows.github.io/ for more info.

And finally please consider that the essense of your question has
really nothing to do with Git (and any of its Windows port): since
interacting with Git has to be done by calling its "plumbing" programs
your question is about general-purpose programming (scripting).
Such questions are way better to be asked on the resources dedicated to
such topics -- general scripting on the Windows platform.
Reply all
Reply to author
Forward
0 new messages