-
Notifications
You must be signed in to change notification settings - Fork 276
02. GIT. Local
Siarhei P edited this page Dec 19, 2024
·
10 revisions
- Create a new directory on your local machine.
- Navigate to the newly created directory using the command line.
- Initialize a new Git repository in this directory.
- Create a new file named
README.md
and add some content to it. - Stage and commit the
README.md
file to the repository.
- Create a new branch named
feature-branch
. - Edit the
README.md
file to add a brief description of your project. - Commit your changes to the
feature-branch
. - Switch back to the main branch (usually
master
ormain
). - Merge the changes from
feature-branch
into the main branch.
- Use the
git log
command to view the commit history of your repository. - Identify the commit hashes, dates, and commit messages.
- Try using different formatting options for
git log
to customize the output. - Use
git show <commit-hash>
to view the details of a specific commit.
- Create a tag named
v1.0
on a specific commit in your repository's history. - Verify that the tag has been created successfully.
- Make some additional changes to the
README.md
file and commit them. - Create a new tag named
v2.0
on the latest commit. - Explore the difference between annotated and lightweight tags.
- Create a new branch named
bug-fix
. - Make a change to the
README.md
file and commit it. - Make another change and commit it.
- Use
git reset
to undo the most recent commit while keeping the changes. - Explore the effects of
git reset
with different options (soft, mixed, hard).
- Create a new branch named
experimental-feature
. - Make some changes to the
README.md
file but do not commit them. - Use
git stash
to temporarily store your changes. - Switch to "another branch" and make a different set of changes.
- Apply the changes from the stash to the "another branch" branch.
- Configure your Git username and email globally.
- Set up a custom alias for a frequently used Git command.
- Use the
git config
command to verify your configuration changes.
All your commands put into files 02.GIT.Local.md and add to your forked repository sa.it-academy.by, then prepare PR (Pull Request)
IMPORTANT!!! Use git markdown for your report. See link
Additional: Create README.md with project description in your folder. You will be maintain its during our course till the final demo