Git, the widely popular version control tool that just about everyone who works on the web seems to use, is powerful, scalable, flexible. . .and difficult to learn. If you’ve used Git for any amount of time, you’ve probably gotten yourself into some confusing, frustrating, or downright terrifying situations. But don’t panic. You are not alone. Katie Sylor-Miller explains how to avoid getting into Git messes in the first place, demonstrating how the fundamental structures in Git actually work under the hood and sharing best practices, workflows, and tools that will keep your commits in order and reduce the panic caused by merge conflicts. Katie then shows you how to leverage Git’s powerful features to save yourself when everything seems to go wrong.
Git is a distributed version control system, created by Linus Torvalds, and used worldwide by many software developers for a large number of well known software projects.
In this presentation, I explain the fundamentals of the Git software and some of its internal workings and related terminology. The target audience is individuals who have used Git before in a limited capacity and want expand their knowledge of the software to improve their daily use of it. The presentation could also be useful for those with knowledge of Git and a desire to improve their understanding of some of the more technically elements.
GitHub is a web-based hosting service for version control using git. It is mostly used for computer code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project
Git, the widely popular version control tool that just about everyone who works on the web seems to use, is powerful, scalable, flexible. . .and difficult to learn. If you’ve used Git for any amount of time, you’ve probably gotten yourself into some confusing, frustrating, or downright terrifying situations. But don’t panic. You are not alone. Katie Sylor-Miller explains how to avoid getting into Git messes in the first place, demonstrating how the fundamental structures in Git actually work under the hood and sharing best practices, workflows, and tools that will keep your commits in order and reduce the panic caused by merge conflicts. Katie then shows you how to leverage Git’s powerful features to save yourself when everything seems to go wrong.
Git is a distributed version control system, created by Linus Torvalds, and used worldwide by many software developers for a large number of well known software projects.
In this presentation, I explain the fundamentals of the Git software and some of its internal workings and related terminology. The target audience is individuals who have used Git before in a limited capacity and want expand their knowledge of the software to improve their daily use of it. The presentation could also be useful for those with knowledge of Git and a desire to improve their understanding of some of the more technically elements.
GitHub is a web-based hosting service for version control using git. It is mostly used for computer code. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project
A Brief Introduction to Working with GitPhilip Langer
This slide deck is intended for Git beginners and focuses on the underlying concepts, the usage of the command line, especially the commands git reset, git checkout, git revert, git commit, and eventually introduces models for using Git and why git rebase may play an important role in some those models.
Here Don goes over some of the benefits of using GIT as well as some of the basic concepts and methods. Later he goes through the workflow of using GIT. Download his slides here or email him at dlee@tagged.com.
These are the slides for a workshop I gave on June 2, 2014 at USC. They are an introduction to git and version control for my fellow scientists. Note that the branching section draws heavily on the diagrams and material from the Pro Git book (http://git-scm.com/book/), though I reimplemented them for my own uses.
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
Mistakes happen - no matter how experienced you are. Using Git as your version control system, however, you have a safety net that helps you if it comes to the worst. Learn how to undo, roll back, and recover from mistakes.
A Brief Introduction to Working with GitPhilip Langer
This slide deck is intended for Git beginners and focuses on the underlying concepts, the usage of the command line, especially the commands git reset, git checkout, git revert, git commit, and eventually introduces models for using Git and why git rebase may play an important role in some those models.
Here Don goes over some of the benefits of using GIT as well as some of the basic concepts and methods. Later he goes through the workflow of using GIT. Download his slides here or email him at dlee@tagged.com.
These are the slides for a workshop I gave on June 2, 2014 at USC. They are an introduction to git and version control for my fellow scientists. Note that the branching section draws heavily on the diagrams and material from the Pro Git book (http://git-scm.com/book/), though I reimplemented them for my own uses.
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
Mistakes happen - no matter how experienced you are. Using Git as your version control system, however, you have a safety net that helps you if it comes to the worst. Learn how to undo, roll back, and recover from mistakes.
Two days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.
This PPT describes most used commands.
We have compiled the most important slides from each speaker's presentation. This year’s compilation, available for free, captures the key insights and contributions shared during the DfMAy 2024 conference.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsVictor Morales
K8sGPT is a tool that analyzes and diagnoses Kubernetes clusters. This presentation was used to share the requirements and dependencies to deploy K8sGPT in a local environment.
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Literature Review Basics and Understanding Reference Management.pptxDr Ramhari Poudyal
Three-day training on academic research focuses on analytical tools at United Technical College, supported by the University Grant Commission, Nepal. 24-26 May 2024
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
2. First of all, VCS
• VCS: Version Control System
• Keep tracking modifications over files
• Centralized Version Control Systems
• CVS, Subversion, Perforce
• Distributed Version Control Systems
• Git, Mercurial, Bazaar, Darcs
4. Installation
• Mac - homebrew
• brew install git
• Windows
• Download git installer from git’s website
• Linux - package managers
• apt-get / aptitude / yum / rpm
5. Start working with git
• You usually start with:
• Make your own: git init
• Contains only master branch
• Work with existing project: git clone <url>
6. Terminology
• Working tree: the physical
working directory managed
by git
• Index: holds a snapshot of
the content of the working
tree, and it is this snapshot
that is taken as the
contents of the next
commit. Thus after making
any changes to the working
tree, and before running the
commit command, you
must use the add
command to add any new
or modified files to the
index.
• Repository: where git stores
files. All commits are
recorded by repository
https://dotblogs.com.tw/wasichris/2016/04/29/225157
7. Branches
• stable
• master
• stable master approach (commonly with develop branches)
• unstable master approach (accepts merges from feature/
issue and hotfix, with a stable branch)
• feature/issue
• hotfix
• wip (work in progress)
8. Setup identification info
• git config —global user.name “Tony Stark”
• git config —global user.email
“shh_not_ironman@stark.com”
• To configure different info for different projects, run the
previous command in the project without option —global
• To check config
• git config —list —global
• git config —list
9. .gitignore
• It indicates “what” shall not be tracked
• Directories
• build intermediates
• Build/Output
• build/
• Pods/
• Certain type of files
• .DS_Store, Gemfile.lock, Podfile.lock
• Comments start with pound sign(#)
10. add
• Add file contents to the index
• git add <paths> …
• git add .
• You may add files by regex
• git add *.sh
• -i: interactive
• Unless you have nicely composed .gitignore, using command
git add . might add files that are not suppose to be tracked
12. rm
• Remove files from the working tree and from the index
• git rm [—cached | -f] <paths>….
• git rm [—cached | -f] -r .
• —cached
• Unstages and keeps file
• -f
• Unstages and removes files
• -r
• recursive, along with .
13. diff
• Show changes between commits, commit and working tree, etc
• git diff
• git diff <base> <target>
• a base or a target can be a hash of a commit, a branch or a reference to a commit.
• Examples of a reference to a commit
• HEAD, HEAD~1, HEAD@{1}
• stash, stash@{1}
• master~1, master~5
• 044517c6faf3757f1f2ea4844d824bd397d488c9~1
• the commit prior the hash
14. diff and patch
• You may also generate patch file by:
• git diff <base> <target> > <patch_file>
• If the change involves binary files: git diff —
binary <base> <target>
• To apply the patch git apply <patch_file>, or
git apply —binary <patch_file> if the patch
contains binary diff
16. reset
• Reset current HEAD to the specified state
• git reset [—soft | — mixed | —hard] <hash / ref>
• —soft
• reset only the repository to the specified state, preserving the content of
working tree and index/cache
• —mixed
• reset the repository and the index/cache, while preserving the content of
working tree
• —hard
• Do not preserve the information of the original commit. It resets working tree,
index/cache and the repository
17. revert
• Revert some existing commits
• git revert <commit/ref>
• revert a single commit
• git revert —continue
• Resolve conflicts and continue
• git revert —abort
• Abort revert
• git revert -n master~4…master~2
• Reverting from the forth latest commit of master(included) to the second
latest commit of master(included) without committing the revert(flag -n).
18. Resolving conflicts
• From time to time, you encounter conflicts to be
solved
• Check the blocks surrounded by conflict markers
and revise them properly
20. cherry-pick
• Apply the changes introduced by some existing commits
• git cherry-pick <ref/commit>
• git cherry-pick brach~2
• git cherry-pick
00492d0a930cfc3e9a891151b62ea0d5629fc5f5
• git cherry-pick —continue
• git cherry-pick—abort
21. stash
• Stash the changes in a dirty working directory away
• git stash
• stash the changes
• git stash list
• show the stash list
• git stash drop [<stash>]
• Remove a single stashed state from the stash list
• stash ref is in form stash@{<revision>}
• If no <stash> is given, it removes the latest one.
• git stash clear
• Remove all stashed changes. Use with caution.
22. stash - cont.
• git stash pop [<stash>]
• Remove a single stashed state and apply it to the top of current working
tree state
• git stash apply [<stash>]
• Like pop, but do not remove the stash from the stash list
• git branch <branch name> [<stash>]
• Creates and checks out a new branch named <branchname> starting from
the commit at which the <stash> was originally created, applies the
changes recorded in <stash> to the new working tree and index. Then, the
stage is dropped
• If no <stash> given, the latest is applied.
23. commit
• Record changes to the repository
• git commit -m <your message>
• git commit —interactive
• git commit -a | —all
• automatically stage files that have been modified and
deleted, but new files you have not told Git about are not
affected.
• git commit —amend
• Amend new changes to previous commit
25. branch
• List, create, or delete branches
• git branch <branch name>
• Create a branch
• git branch [-r]
• list branches, with -r shows remote ones
• git [—set-upstream-to=<upstream> | -u <upstream> | unset-upstream] <branch name>
• set/remove the upstream of the branch
• git branch [-d | -D] <branch name>
• delete a branch. -D is a shortcut for ‘-d -f’
• git -m <old branch name> <new branch name>
• Rename/move a branch
26. checkout
• Switch branches or restore working tree files
• git checkout <branch>
• Switch to the specified branch
• git checkout — .
• Restore working tree state
• git checkout -b <branch> —track <remote>/<branch>
• Create, checkout and track a remote branch with a local branch
• git checkout [—ours | theirs] — <paths>
• —ours: apply working tree with your change
• —theirs: apply working tree with the change made by others
27. tag
• Create, list, delete or verify a tag object signed with GPG
• git tag -a <tag name> [-m <message>]
• light-weight tag: no -m option
• annotated tag: with -m option
• git tag -s <tag name> [-m <message>]
• similar with -a, it signs GPG signature to the tag
• git tag -l <pattern>
• list tags that matches the pattern
• e.g, git tag -l ‘v1.*’
• git tag -d <tag name>
• Delete tag with the tag name
• NOTE
• Tags are usually used to tag official release versions or milestone versions
28. push
• Update remote refs along with associated objects
• git push origin <local branch>
• You may need to setup upstream
29. pull
• Fetch from and integrate with another repository or
a local branch
• git pull
30. merge
• Join two or more development histories together
• git merge <branch>
• Merge <branch> into current branch
• git merge —abort
• Abort merging when you did a mess
• Merging ends with commit command
31. rebase
• Reapply commits on top of another base tip
• git rebase <branch>
• Rebase current branch with <branch>
• git rebase —continue
• Continue rebasing after solving conflicts
• git rebase —skip
• When rebasing encounters no changes, use this option to skip the commit
and continue rebasing
• git rebase —abort
• Abort rebasing when you messed up
32. Rebase or merge?
• “If you would prefer a clean, linear history free of
unnecessary merge commits, you should reach
for git rebase instead of git merge when
integrating changes from another branch.” —
Atlassian
• https://www.atlassian.com/git/tutorials/merging-vs-
rebasing/conceptual-overview
33. Rebase or merge?
• Rebasing tremendous amount of changes may be
difficult. Merging would be easier in this case
34. reflog
• Manage reflog information
• A mechanism to record when the tip of branches are updated
• You may have a chance of getting lost commits back (such as losing DETACHED
branch). It will give you the commit hashes of the mis-placed commit
• Once you got the commit hash or ref:
• git checkout <hash/ref>
• Example:
• git checkout refs/heads/master@{10}
• git checkout HEAD@{3}
• git checkout d7a4926
35. reflow - cont.
• git reflog
• Show reflogs
• git reflow —all
• Process the reflogs of all references
36. git blame
• Show what revision and author last modified each line
of a file
• git blame <path>
• Blame a single file
• git blame -L <start>, <end> <path>
• Blame a single file with a range. The simplest is
number, such as -L 1,10 (blame from line 1 to line
10)
37. log
• Show commit logs
• git log
• Show commit logs of current branch
• git log -S <pattern>
• you may use it to find commits of a deleted line with certain keyword
or pattern
• e.g. git log -S ‘to be deleted’
• git log —graph
• Show a text-based graphical representation of the commit history
38. git fetch
• Download objects and refs from another repository
• git fetch
• When you have problems of refs with your local git
repo, usually you may fix them by this command
39. Appendix: Rebasing a
branch pushed to remote
• git checkout <the branch>
• git pull
• get the latest changes
• git rebase <another branch>
• Resolve conflicts if any, until all changes applied
• git rebase —continue
• When you’re done with rebase, you may find you cannot push the branch. DON’T PANIC!
• git pull
• if you didn’t set upstream, set it first
• git commit