際際滷

際際滷Share a Scribd company logo
Eclipse EGit
Project Explorer > Right click > Context Menu
Pull code changes from
remote repository
Push code change to
remote repository
No need to use this option
It will launch merge tool.
Auto merge the code
changes
To commit new file
Eclipse EGit
Project Explorer > File > Right click > Context Menu
Eclipse EGit
Git staging window
Git Local
Repository
Git Remote
Repository
Git Local
Repository
Eclipse EGit
Adding New File
main.css > Right click > Team > Add to
Index
main.css > Right click > Team > Commit >
Stagin Window > Enter Comment > [Commit
and Push]
? Icon
+ Icon
User Machine 1 User Machine 2
Project > Right click > Team > Pull
> Icon
Note :
Eclipse EGit
User Machine 1 User Machine 2
Case I: Commit, Push and Pull
Updating index.html file Updating main.css file
[Commit and Push] > Sucess
[Commit and Push] > It will show error.
Here main.css committed successfully in local
repository but failed to push
Right click > Project > Team > Pull
Right click > Project > Team > Push Upstream
Right click > Project > Pull
Both the machines are updated due to Pull action
Eclipse EGit
User Machine 1 User Machine 2
Case II: Commit, Push and Pull
Updating index.html file in line #3 Updating index.html file in line #2
[Commit and Push] > Success
[Commit and Push] > Rejected
Step 1 : Project > Right click > Team > Pull
Step 2 : index.html > Right click > Team >
Merge Tool
Step 3 : Move Line#3 change from Right to Left
Step 4 : index.html > Right click > Team > Add
to Index
Step 5: [Commit and Push] > Success
Right click > Project > Pull
With out performing
Commit to local
Repository we cant
trigger Pull Request
due to conflicts
Eclipse EGit
User Machine 1 User Machine 2
Case III: Commit, Push and Pull
Updating index.html file in line #2 and adding
few team members
[Commit and Push] > Success
Updating index.html file in line #2
index.html > Right click > Team > Commit >
clicking [Commit] button.
It will not throw any errors. It will commit to
local repository.
Eclipse EGit
User Machine 2
Case III: Commit, Push and Pull (Cont..)
Step 2 : index.html > Right click > Team >
Merge Tool
Step 1 : Project > Right click > Team > Pull
Eclipse EGit
User Machine 1 User Machine 2
Case III: Commit, Push and Pull (Cont..)
Step 4 : index.html > Right click > Team > Add
to Index
Step 5: [Commit and Push] > Success
Right click > Project > Pull
Eclipse EGit
To accept single file changes
Step 1: Project > Right click > Team > Fetch
from Upstream
Step 2: File > Right click > Compare with >
Branch, Tag or Reference
Step3: In Compare Dialog > Select Remote
Tracking > Eg: origin/mater > [Compare]
button
Step4: We can move changes from Right to
Left (Local)
Eclipse EGit
Thank You,
Happy 珂艶姻乙庄稼乙.

More Related Content

Eclipse e git

  • 1. Eclipse EGit Project Explorer > Right click > Context Menu Pull code changes from remote repository Push code change to remote repository No need to use this option It will launch merge tool. Auto merge the code changes To commit new file
  • 2. Eclipse EGit Project Explorer > File > Right click > Context Menu
  • 3. Eclipse EGit Git staging window Git Local Repository Git Remote Repository Git Local Repository
  • 4. Eclipse EGit Adding New File main.css > Right click > Team > Add to Index main.css > Right click > Team > Commit > Stagin Window > Enter Comment > [Commit and Push] ? Icon + Icon User Machine 1 User Machine 2 Project > Right click > Team > Pull > Icon Note :
  • 5. Eclipse EGit User Machine 1 User Machine 2 Case I: Commit, Push and Pull Updating index.html file Updating main.css file [Commit and Push] > Sucess [Commit and Push] > It will show error. Here main.css committed successfully in local repository but failed to push Right click > Project > Team > Pull Right click > Project > Team > Push Upstream Right click > Project > Pull Both the machines are updated due to Pull action
  • 6. Eclipse EGit User Machine 1 User Machine 2 Case II: Commit, Push and Pull Updating index.html file in line #3 Updating index.html file in line #2 [Commit and Push] > Success [Commit and Push] > Rejected Step 1 : Project > Right click > Team > Pull Step 2 : index.html > Right click > Team > Merge Tool Step 3 : Move Line#3 change from Right to Left Step 4 : index.html > Right click > Team > Add to Index Step 5: [Commit and Push] > Success Right click > Project > Pull With out performing Commit to local Repository we cant trigger Pull Request due to conflicts
  • 7. Eclipse EGit User Machine 1 User Machine 2 Case III: Commit, Push and Pull Updating index.html file in line #2 and adding few team members [Commit and Push] > Success Updating index.html file in line #2 index.html > Right click > Team > Commit > clicking [Commit] button. It will not throw any errors. It will commit to local repository.
  • 8. Eclipse EGit User Machine 2 Case III: Commit, Push and Pull (Cont..) Step 2 : index.html > Right click > Team > Merge Tool Step 1 : Project > Right click > Team > Pull
  • 9. Eclipse EGit User Machine 1 User Machine 2 Case III: Commit, Push and Pull (Cont..) Step 4 : index.html > Right click > Team > Add to Index Step 5: [Commit and Push] > Success Right click > Project > Pull
  • 10. Eclipse EGit To accept single file changes Step 1: Project > Right click > Team > Fetch from Upstream Step 2: File > Right click > Compare with > Branch, Tag or Reference Step3: In Compare Dialog > Select Remote Tracking > Eg: origin/mater > [Compare] button Step4: We can move changes from Right to Left (Local)
  • 11. Eclipse EGit Thank You, Happy 珂艶姻乙庄稼乙.