Getting Git to work with Eclipse: The least fun thing you’ll ever do By Orren Saltzman.

Slides:



Advertisements
Similar presentations
Packaging a Presentation on a CD, using PowerPoint 2003 Multimedia Services at The Citadel Updated
Advertisements

Microsoft ® Office Access ® 2007 Training Easy Access with templates I: Create a database susanguggenheim-is.com presents:
Setting Up Dropbox PCNA: HOW TO SETUP & SYNC FILES WITH DROPBOX.
CMSC433 Solving Project 0 Getting started with BitBucket, Git and Eclipse CMSC433 - Programming Language Technologies and Paradigms (Spring 2012)
 Please sit next to your partner.  If you don’t have a partner, please find one now.
Microsoft ® Office Outlook ® 2007 Training Retrieve, back up, or share messages ADVANTAGE TALENT, INC. “Professionals Helping Professionals” Candidate.
Application Support This is an excerpt from a section of the course that explains a new area of group policies called “Software Restricion Policies”
Github. Download & install git   Git bash  Git GUI.
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
Git A distributed version control system 23-Aug-15.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
Version control with Github August 26th, 2014 Daniel Schreij VU Cognitive Psychology departement
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Git – versioning and managing your software L. Grewe.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Git (Get) it done right! Practical Applied Version Control for Drupal site developers Peter Chen - Stanford School of Engineering Technical Webmaster.
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git Fundamentals Rochelle Terman 13 January 2014.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
1 Perl Note, I am hoping that we can accomplish all we need to with CSS accounts, Linux, and the NoMachine client -- since these already have Perl installed.
Intro to Git presented by Brian K. Vagnini Hosted by.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Loader Tutorial Set Up. Requirements Java 7 Eclipse IvyIDE plugin Git Optional: Ant Maven.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
Git with Eclipse (EGit) /article.html.
Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.
Lecture 5 Remotes Sign in on the attendance sheet! Turn in homework at the front!
Installing a Moodle Test Site The painless and easy way.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Version Control Systems
Version control and issue tracking options for IHE PCD
CS5220 Advanced Topics in Web Programming Version Control with Git
L – Modeling and Simulating Social Systems with MATLAB
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
GIT AND GITHUB WORKSHOP
SVN intro (review).
Git Practice walkthrough.
Setting up Git, GitBash, and GitHub
A Simple Introduction to Git: a distributed version-control system
Macaualy2 Workshop Berkeley 2017
Version Control Systems
SIG: Open Week 1: GitHub Tim Choh.
Setting up Git, GitBash, and GitHub
Getting Started with Git and Bitbucket
Install Ruby If you are running on Mac OS X, Ruby is preinstalled.
JavaTeaching and Importing a github repository
Setting up an Eclipse project from a repository on GitHub
Using Github.
Git CS Fall 2018.
Download and Installation of code::blocks
Introduction to Git and GitHub
Convert an Eclipse Project to a Git repository and push up to GitHub
Git started with git: 2018 edition
Version/revision control via git
Introduction to Git and Github
Carthage ios 8 onwards Dependency manager that streamlines the process of integrating the libraries into the project.
Using GitHub for Papyrus Models Jessie Jewitt – OAM Technology Consulting/ ARM Inc. January 29th, 2018.
Presentation transcript:

Getting Git to work with Eclipse: The least fun thing you’ll ever do By Orren Saltzman

Why am I qualified to talk about this? -I probably have some minor form of OCD -As a result, I spent valuable time learning about this when I should have been working on the actual assignments -I’ve voluntarily been helping others to set up their Git Repos, for practice (or maybe because I enjoy pain) -I didn’t spend hours on the githug assignment typing nonsense into a black box for nothing -I take it personally when software doesn’t do as I say.

Where do we even start? We could start in Eclipse: -Create a new project from the package directory -Create a new local repo (git init) -Create a new empty remote repo on github.com -Connect them using (git remote add origin ) -Make some commits -Attempt to push to remote repo using (git push origin)

Where do we even start? We could start in Eclipse: -Create a new project from the package directory -Create a new local repo (git init) -Create a new empty remote repo on github.com -Connect them using (git remote add origin ) -Make some commits -Attempt to push to remote repo using (git push origin) -Receive cryptic and mysterious error messages you can do nothing about: -Go insane, fail classes, drop out of MCIT, become a crazy hobo

Where do we even start? We could start at github: -Create a remote repo through github.com -Download it into your eclipse workspace using -Frantically refresh your package directory for fifteen minutes - Punch your computer in its stupid computer face

The real problem is: Getting Eclipse to recognize git repositories as project folders Dealing with invisible folders managed by git: -.git -.gitignore Dealing with invisible folders managed by Eclipse: -.settings -.project -.classpath The Eclipse ones appear to be platform specific (yay)

One possible Solution: Egit! - A Git plugin/GUI for Eclipse. Perfect!

One possible Solution: Egit! - A Git plugin/GUI for Eclipse. Perfect! Actually, don’t do this

OK, so what’s the right thing to do? -It’s probably best to start the repo on github -Allow github to create your README file (I don’t know why, just do it) -Also allow it to create a.gitignore file and set it to Java (this part is just convenient) -When you’re done, github helps you out with a screen on what to do next:

First of all, stare at this for awhile because you’ll never get back to it without starting over - What does the -u argument mean? - Didn’t we try this remote add nonsense once already?

Cloning - We’ll get back to -u in a minute -For now, how about we clone rather than copy -The github native app is extremely useful for this -Install it, and all of a sudden you have this! -The same thing exists for windows -If you’re on the linux cluster, no app, but this also works: -Navigate to Eclipse workspace in terminal -git clone -Just don’t use git init, it’s messier and you’ll get more network errors

A quote: “Eclipse is a terrible piece of software and no one should ever use it.” -Orren Saltzman

Eclipse import wizard -There’s a chance you’ll open up Eclipse and the project will just appear. If it does, don’t question it. Just move on with your life. -If not, right click on your package explorer and click -If you’re on a Linux machine, you may see a git option in this wizard that will allow you to clone remote repos directly. This worked the one time I tried it, so it’s definitely worth a shot. -If you’re using a mac, you won’t see this option. -Try General > Existing Projects into Workspace -Last resort: General > File system

Before you do anything else! -Add the invisible Eclipse files to.gitignore -You don’t want your partner getting these, they need to make their own -format: One ignore per line, wildcards allowed (*) -Finally, it’s time to make our first commit….

So you want to commit… -You aren’t out of the woods yet. Your first commit from here is a delicate process. -You can try add, commit, push like normal -If this doesn’t work, try fetch, pull, push. -This will be necessary if git thinks something has changed on github for some reason. -Sometimes it will give you this crap: -Just do what it says and specify ‘master’ after ‘origin’

Y U NO USE –U?! -By the way, the -u argument in push means ‘upstream’, and defines the remote repo you specify as the default and central repo -If you successfully use (git push origin -u) once, you never have to specify the remote name again, just (git push)

Some things to make this easier: Aliases! -If you haven’t used them yet, they can save you tons of time. Those first two are the absolute best thing of ever

Aliases on Windows The Windows equivalent of alias is doskey Here’s an example file: Name it (for example) aliases.bat, run as aliases (Added by Dave)

Branches, tags, and remote content, all viewable from the terminal

Some source material -Lots of info online, but none of it is well- curated -The Tuts+ Premium video course on git essentials - -Unfortunately, there’s a monthly fee, but I would recommend paying for one month, downloading everything that interests you, and then cancelling.

Congrats, you’ve survived

A final note… -If you would like to refer to this presentation in the future (and I can’t imagine why) I put it on the web -But unfortunately, I placed it in a github repo, so you’ll probably never find it. -Username: orren -Repo name: why_no_workee