DEV Community

Cover image for My Journey with Git & GitHub: Insights, Tips, and Lessons.
Shafe Alam
Shafe Alam

Posted on • Updated on

My Journey with Git & GitHub: Insights, Tips, and Lessons.

Course Review

As an aspiring developer, I am always on the lookout for online resources to enhance my skills and knowledge. After research, I stumbled upon the ‘GitHub Ultimate’ course on Udemy, and I have to say, it has been a game-changer for me.

From the moment I enrolled in this course, I knew I was in for a treat. The instructor’s expertise and passion for GitHub were evident right from the start. The course covers everything from the basics to more advanced topics, making it suitable for both beginners and experienced users alike.

One of the aspects that impressed me the most was the course’s structure and organization. The curriculum is well-designed, with each module building upon the previous one, providing a seamless learning experience. The lectures are presented in a clear and concise manner, with practical examples that help solidify the concepts learned.

Furthermore, the course covers various advanced topics, such as collaborating with other developers, managing repositories, handling issues and pull requests, and using GitHub Pages. These topics have been immensely valuable to me as I strive to become a more proficient and efficient developer.

The course also includes bonus content, such as tips and tricks, best practices, and real-world use cases, which I found to be highly practical and insightful. The instructor’s depth of knowledge and experience in using GitHub is evident throughout the course, and I found myself constantly learning new techniques and strategies to optimize my workflow.


Tips

After learning HTML, CSS & JavaScript I have realized that version control is the most important part of web development or software development. If you tell me “what should I learn after learning HTML, CSS & JavaScript I will suggest you to learn version controlling. When you are doing project with Vanilla JavaScript or any other frameworks you will become lost in space if you are doing your project without version control. And it will also help you to experiment with new feature as you can easily revert back to known good state. So after learning vanilla JavaScript you must learn version control. At least basic commands so that you can place your code to remote repository. I like to use GitHub. GitHub is a web-based hosting service for version control using Git, providing developers with a platform for code collaboration, management, and sharing. It is widely used in the software development industry and offers robust features for efficient code management and collaboration among team members.


My Notes

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-1

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-2

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-3

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-4

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-5

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-6

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-7

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-8

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-9

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-10

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-11

Git & GitHub (Shafe Alam) #techtinkererfullstack — — page-12


Important Commands & Keywords from notes

Git advance

  1. Git diff commitsid HEAD
  2. Git difftool commitid HEAD
  3. Git help diff
  4. Fast forward merge, automatic merge, manual merge
  5. Git checkout -b branchNameWeWannaCreate
  6. Git branch
  7. Git checkout master
  8. Git update
  9. Git checkout -b very-bad
  10. Git mergetool
  11. Light weight tag, annotations tag
  12. Git tag mytag
  13. Git tag — list
  14. Git tag -d mytag
  15. Git tag -a v1.0 -m “Released V1.0”
  16. Git show v1.0
  17. Git stash
  18. Git stash list
  19. Git stash pop
  20. Reset — — -soft — —
  21. Git reset commitId — soft
  22. Git reset commitId — mixed
  23. Git reset commitId — hard
  24. Git reflog
  25. Git reset — hard commitID (to back to that commit point, this commit id is taken from git reflog)

GitHub

  1. Git remote -v
  2. Git remote add origin githupRepositoryHttps/sshLink
  3. Git push -u origin master — tags (to push local repository to remote repository, -u indicate tracking between local and remote repository)

ssh authentication

  1. git push origin master
  2. ssh-keygen -t rsa -C “yourEmail@address” (-t =type, here type is rsa, -C for common name)
  3. npp id_rsa.pub (copy all text from here and paste it to github ssh key)
  4. ssh -T git@github.com (to confirm machine can communicate through ssh key with github)
  5. Id_rsa, id_rsa.pub

GITHUB REPOSITORY

  1. Git clone githubRepositoryAddress (here repository name is my-website)
  2. rm -rf my-website (to remove repository whole folder from local repository)
  3. Git clone githubRepositoryAddress website (to change the repository name in local machine)
  4. Git push
  5. Git config — global push.default simple
  6. Git fetch
  7. Git pull
  8. Git push
  9. Git remote set-url origin repositoryAddress (if change name of repository in hithub)
  10. Git remote show origin
  11. Git show commitID (this commit id is copy from github )

GITHUB REPOSITORY BRANCH

  1. Git checkout -b remove-lipsum
  2. Git push -u origin remove-lipsum (-u means traking relation, here remote is origin, and tracking branch remove-lipsum, this command will also create a new branch on github)
  3. Git merge
  4. Git branch -d remove-lipsum (-d = delete)
  5. Gir branch -a
  6. Git fetch -p (-p is a prune option it will look for any dead branches and will remove its reference)
  7. Git checkout update-readme (this repository is not in local repo ita on github but this command will create local repo of update-readme )
  8. Git pull — all
  9. Git merge update-readme
  10. Git push origin :update-readme (this command will delete github branches feom command line)
  11. Git pull — rebase (local cimmit will be 1 commit ahead of remote head)

Tags

1..Git tag unstable develop

  1. Git tag stable main
  2. Git tag -a v1.0-alpha -m “Release v1.0” commitID
  3. Git show (with annotations tag)
  4. Git tag
  5. Git tag -a v2.0-alpha -m “Release v2.0” commitsid
  6. Git push origin stable (to push a single tag)
  7. Git push — tag ( to push all tags)
  8. Git fetch -p
  9. Git tag -d v1.0-alpha
  10. Git push origin :v2.0-alpha (to delete remote tags)
  11. Git tag -f unstable commitID (to assign tag to specific commit id )
  12. Git push — force origin unstable
  13. Git pull (GitHub create light weight tag)

Links

If you are looking for a creative & professional UI/UX Designer checkout my brother's profile :

Top comments (0)