Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thank You for the Guidance #1055

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ feel free to use these emojis: https://gist.github.com/rxaviers/7360908 :relaxed
- [Fatemeh :unamused:](https://github.com/FatemehMashayekhi)
- [ConfusedCharacter :relaxed:](https://github.com/ConfusedCharacter)
- [Ali Jahromi](https://github.com/alijahromi)
- [Mohammad Hoseyn Saeedi](https://github.com/h0z3yn)
- [Mohammadreza ShahriyarKeshe 🎯](https://github.com/mohammadrezashsk)
- [AmirHosseinSadeghDaghighi](https://github.com/iamAmirSadeghi)
- [AmirHosein 🌿 ](https://github.com/omidmblove80)
Expand Down
11 changes: 11 additions & 0 deletions all-notes-from-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ some notes for git learners
git checkout -- 'filename'
```
- `'--'`: Refers to the HEAD (latest commit).
- To create a new branch and switch to it at the same time, use:
```
git checkout -b 'new-branch-name'
```
This command creates a new branch called `'new-branch-name'` and immediately switches to it.


10. **Merge Branches:**
Expand Down Expand Up @@ -160,6 +165,12 @@ some notes for git learners
- `origin`: Represents the remote repository.
- `git push -u origin master`: After using this parameter, you can use `git push` instead
of `git push origin master`.
- **Force Push:** In some cases, you may need to push changes that overwrite the existing commit history on the remote branch. This is done using the `--force` flag:
```
git push origin master --force
```
- **Warning:** Force pushing will overwrite the history on the remote repository, which may cause data loss if others have pushed commits to the same branch. Use with caution, especially if working in a team.
- Consider using `--force-with-lease` for a safer approach, which ensures that the push will only occur if no one else has updated the branch.

14. **Pull from a Remote Repository:**

Expand Down