My Journey with Git & GitHub: Insights, Tips, and Lessons.
Shafe Alam
Posted on April 20, 2023
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
Important Commands & Keywords from notes
Git advance
- Git diff commitsid HEAD
- Git difftool commitid HEAD
- Git help diff
- Fast forward merge, automatic merge, manual merge
- Git checkout -b branchNameWeWannaCreate
- Git branch
- Git checkout master
- Git update
- Git checkout -b very-bad
- Git mergetool
- Light weight tag, annotations tag
- Git tag mytag
- Git tag — list
- Git tag -d mytag
- Git tag -a v1.0 -m “Released V1.0”
- Git show v1.0
- Git stash
- Git stash list
- Git stash pop
- Reset — — -soft — —
- Git reset commitId — soft
- Git reset commitId — mixed
- Git reset commitId — hard
- Git reflog
- Git reset — hard commitID (to back to that commit point, this commit id is taken from git reflog)
GitHub
- Git remote -v
- Git remote add origin githupRepositoryHttps/sshLink
- Git push -u origin master — tags (to push local repository to remote repository, -u indicate tracking between local and remote repository)
ssh authentication
- git push origin master
- ssh-keygen -t rsa -C “yourEmail@address” (-t =type, here type is rsa, -C for common name)
- npp id_rsa.pub (copy all text from here and paste it to github ssh key)
- ssh -T git@github.com (to confirm machine can communicate through ssh key with github)
- Id_rsa, id_rsa.pub
GITHUB REPOSITORY
- Git clone githubRepositoryAddress (here repository name is my-website)
- rm -rf my-website (to remove repository whole folder from local repository)
- Git clone githubRepositoryAddress website (to change the repository name in local machine)
- Git push
- Git config — global push.default simple
- Git fetch
- Git pull
- Git push
- Git remote set-url origin repositoryAddress (if change name of repository in hithub)
- Git remote show origin
- Git show commitID (this commit id is copy from github )
GITHUB REPOSITORY BRANCH
- Git checkout -b remove-lipsum
- 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)
- Git merge
- Git branch -d remove-lipsum (-d = delete)
- Gir branch -a
- Git fetch -p (-p is a prune option it will look for any dead branches and will remove its reference)
- Git checkout update-readme (this repository is not in local repo ita on github but this command will create local repo of update-readme )
- Git pull — all
- Git merge update-readme
- Git push origin :update-readme (this command will delete github branches feom command line)
- Git pull — rebase (local cimmit will be 1 commit ahead of remote head)
Tags
1..Git tag unstable develop
- Git tag stable main
- Git tag -a v1.0-alpha -m “Release v1.0” commitID
- Git show (with annotations tag)
- Git tag
- Git tag -a v2.0-alpha -m “Release v2.0” commitsid
- Git push origin stable (to push a single tag)
- Git push — tag ( to push all tags)
- Git fetch -p
- Git tag -d v1.0-alpha
- Git push origin :v2.0-alpha (to delete remote tags)
- Git tag -f unstable commitID (to assign tag to specific commit id )
- Git push — force origin unstable
- Git pull (GitHub create light weight tag)
Links
- GitHub: https://github.com/techtinkererfullstack
- Website: www.shafealam.wordpress.com
- LinkedIn: https://www.linkedin.com/in/techtinkererfullstack/
- Facebook: https://www.facebook.com/techtinkererfullstack/
If you are looking for a creative & professional UI/UX Designer checkout my brother's profile :
- Website: www.rafeealam.netlify.app
- LinkedIn: https://www.linkedin.com/in/coruscatingart
- Facebook: https://www.facebook.com/coruscatingart
- Behance: https://www.behance.net/coruscatingart
- Dribbble: https://dribbble.com/coruscatingart
- Instagram: https://www.instagram.com/coruscatingart/
Posted on April 20, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.