'Command for hidden folders for git in windows
What are the commands for showing the hidden folders in Git repository in windows?
For example - command in mac is ls -la or ls -a.
I am new to git.
Solution 1:[1]
The simplest way : start a terminal using git-bash, or from WSL (Windows Subsystem for Linux).
You will have a bash shell with access to the standard linux utilies, and ls -la should work from such terminals.
If you started a Powershell terminal, try ls -Hidden.
ls is actually an alias to the powershell command : Get-ChildItem.
The Powershell team mapped a number of usual linux command names to Powershell built-ins (e.g : cd -> Set-Location, uniq -> Get-Unique, pushd -> Push-Location, ... ), but didn't map the options, so the options expected by ls in a Powershell terminal aren't -a ... but rather the options to Get-ChildItem.
One way to figure out what's expected from a "linux" command name you know is to type : get-help <command name> you will see the actual powershell command name, and the options it expects, for example :
$ get-help ls
NAME
Get-ChildItem
SUMMARY
Gets the items and child items in one or more specified locations.
SYNTAX
Get-ChildItem [[-Filter] <System.String>] [-Attributes {Archive | Compressed | Device | Directory | Encrypted |
Hidden | IntegrityStream | Normal | NoScrubData | NotContentIndexed | Offline | ReadOnly | ReparsePoint |
SparseFile | System | Temporary}] [-Depth <System.UInt32>] [-Directory] [-Exclude <System.String[]>] [-File]
[-Force] [-Hidden] [-Include <System.String[]>] -LiteralPath <System.String[]> [-Name] [-ReadOnly] [-Recurse]
[-System] [-UseTransaction] [<CommonParameters>]
Get-ChildItem [[-Path] <System.String[]>] [[-Filter] <System.String>] [-Attributes {Archive | Compressed | Device
| Directory | Encrypted | Hidden | IntegrityStream | Normal | NoScrubData | NotContentIndexed | Offline | ReadOnly
| ReparsePoint | SparseFile | System | Temporary}] [-Depth <System.UInt32>] [-Directory] [-Exclude
<System.String[]>] [-File] [-Force] [-Hidden] [-Include <System.String[]>] [-Name] [-ReadOnly] [-Recurse]
[-System] [-UseTransaction] [<CommonParameters>]
DESCRIPTION
The `Get-ChildItem` cmdlet gets the items in one or more specified locations. [...]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
