-
git config --global user.name "name"
-
git config --global user.email "email"
-
git clone <url>
-
cd <repo-name>
-
mkdir task-2
-
cd task-2
-
touch greeting.txt
-
nano greeting.txt
-
(OR
echo "Hello world" >> greeting.txt
) -
(OR
echo "Hello world" > greeting.txt
)
-
-
git add .
(ORgit add greeting.txt
ORgit add *.txt
) -
git commit -m "Added greeting"
- (OR
git commit and write message using editor
)
- (OR
-
git branch intro && git checkout intro
-
(OR
git checkout -b intro
) -
(OR
git switch -c intro
)
-
-
nano greeting.txt
- (OR
echo "I love Git" >> greeting.txt
)
- (OR
-
git add .
(ORgit add greeting.txt
ORgit add *.txt
) -
git commit -m "Added I love Git"
- (OR
git commit
and write"Added I love Git"
using editor)
- (OR
-
git checkout main
-
git merge intro
-
git tag -a v1
-
git push -u origin main
(ORgit push
)