Skip to content

Instantly share code, notes, and snippets.

@palashmon
Last active February 27, 2024 05:14
Show Gist options
  • Save palashmon/5bd57c75c9b2b1b8af5d5968f13c9da9 to your computer and use it in GitHub Desktop.
Save palashmon/5bd57c75c9b2b1b8af5d5968f13c9da9 to your computer and use it in GitHub Desktop.
Create a new file in git bash

Usage

# You can simply type
> emptyfile.txt

# This will create a empty text file with name "emptyfile"
# This same as doing
echo "" > emptyfile.txt
@divycraft
Copy link

once i am in txt file how to get out of it?

@SiddharthM458
Copy link

SiddharthM458 commented Aug 13, 2023

How do we create a folder in Windows for that command we want to pass in git bash ?

@veereshnj
Copy link

This is for windows command

To create a folder : mkdir foldername(example - docs)
To create a file inside a folder : echo filename(example - index.html )

@Nfor-Becky
Copy link

they tell me it doesn't exist

@MallammaHR
Copy link

Can I use the touch command in windows prompt?
yes you

touch: cannot touch 'first.html': No such file or directory

I need solution

are you working in bit bash or command prompt??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment