2. About Me
In the industry for ~15 years
Solving problems for our customers and users
Mentor and Coach, Open Source Collaboration
Currently Senior Engg Mgr in Github India, prior to that with Microsoft, Intuit,
Ciena, Huawei
Technologies mostly worked on Java, C#, C/C++, ReactJs, Angular, RoR, NodeJs,
AWS, Azure, iOS, Android etc.
3. More About me and Contact
https://www.linkedin.com/in/saquibkhan
https://github.com/saquibkhan
saquibofficial@gmail.com
4. Problem 1: Maintaining history of changes made on a file,
what changed?
when change was made?
why it was made?
Developer want to travel back and forth in time and get any version of the file for the
given version/time.
6. Problem 2: More than one developer (a Team) want to collaborate working on same files and
also able to maintain history of file versions/changes
Who made the change?
9. Short History of Git
● Creator - Linus Travold, also creator of Linux Kernel
● In 2002, the Linux kernel project began using a proprietary DVCS called BitKeeper(similar to Git).
● In 2005 BitKeeper was no longer free.
● Created Git based on some of the lessons they learned while using BitKeeper. Some of the goals of the new system were as
follows:
○ Speed
○ Simple design
○ Strong support for non-linear development (thousands of parallel branches)
○ Fully distributed
○ Able to handle large projects like the Linux kernel efficiently (speed and data size)
18. Git First Time Setup
git --version
git config --global user.name “Saquib”
git config --global user.email saquibofficial@gmail.com
Ref - https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
19. Create a New Repo or Get an Existing one
git init
git clone https://127.0.0.1/existing_repo
The default branch for new repo is main and for older repos it was master
(with ref to GitHub git server)
20. The three Stages
git status
This will show up status of working directory
Files Modified and Ready to be Staged
Files Staged and Ready to be Committed
21. Modified -> Stage -> Commit
git status
git add file1
git commit -m “short msg desc what and why change is done”
32. History
2008 founded in San Francisco, California
2018 Microsoft acquired Github for nearly 7.5 billion USD
Aug 2020 Github India, Hyderabad Office started
https://github.com/about/careers
~70% Employee are Remote
clients don’t just check out the latest snapshot of the files; rather, they fully mirror the repository, including its full history. Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.
Command Line and many other GUI tools
Clone from any git server, use the server ip for cloning a repo, till now Github is not in picture.
In other VCS creating a new branch was very costly effort. This is another strength where git shines.
Please note for new repo it will be main, its the default branch. Origin is remote
Pull is a 2 step process internally, git fetch and git rebase