0% found this document useful (0 votes)
2 views

GitPractice

The document details a series of Git commands executed in a PowerShell environment. It shows the initialization of a new Git repository, the addition of files, and the first commit made to the repository. The final command displays the commit log, confirming the successful addition of two files.

Uploaded by

Atharva Kulkarni
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

GitPractice

The document details a series of Git commands executed in a PowerShell environment. It shows the initialization of a new Git repository, the addition of files, and the first commit made to the repository. The final command displays the commit log, confirming the successful addition of two files.

Uploaded by

Atharva Kulkarni
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

PS C:\git practice> cd one

PS C:\git practice\one> git status


fatal: not a git repository (or any of the parent directories): .git
PS C:\git practice\one> git init
Initialized empty Git repository in C:/git practice/one/.git/
PS C:\git practice\one> ls -la
Get-ChildItem : A parameter cannot be found that
matches parameter name 'la'.
At line:1 char:4
+ ls -la
+ ~~~
+ CategoryInfo : InvalidArgument: (
:) [Get-ChildItem], ParameterBindingExceptio
n
+ FullyQualifiedErrorId : NamedParameterNotF
ound,Microsoft.PowerShell.Commands.GetChildI
temCommand

PS C:\git practice\one> cd .git/


PS C:\git practice\one\.git> cd .
PS C:\git practice\one\.git> cd ..
PS C:\git practice\one> git add file1.txt
PS C:\git practice\one> git status
On branch master

No commits yet

(use "git rm --cached <file>..." to unstage)


(use "git rm --cached <file>..." to unstage)
new file: file1.txt

Untracked files:
(use "git add <file>..." to include in what will be committed)
file2.txt

PS C:\git practice\one> git config --global core.editor "code --wait"


PS C:\git practice\one> git add file2.txt
PS C:\git practice\one> git status
On branch master

No commits yet

Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: file1.txt
new file: file2.txt

PS C:\git practice\one> git commit


hint: Waiting for your editor to close the file...
[master (root-commit) 83a6579] Add content to file1 and file2
2 files changed, 2 insertions(+)
create mode 100644 file1.txt
create mode 100644 file2.txt
PS C:\git practice\one> git log --oneline
83a6579 (HEAD -> master) Add content to file1 and file2
PS C:\git practice\one>

You might also like