Git log -graph -decorate -pretty=oneline -abbrev-commitĪnd I like this format for grading labs: Shows the author and date, too: I think -abbrev-commit can be left off without changing the output. This similar command shows a graphical history similar to what you would see on GitHub. But still an easy way to remember this command! Turns out "decorate" is included by default in more recent git versions. Git log -all -decorate -oneline -graphĪll. Want to look at your local history? Git ()! This link skips past the setup page, since we do that together in class. I find this () to walk through the sorts of things I would like to teach about Git. idea folder and src/.fxml file are present.Ĭongratulations! You now have a complete starting repository! This pulls down the full project from remote to your local repository, local index, and local working directory.ġ. Run ```git clone _.git``` as above (Or ```git pull``` from within your git directory if you've already cloned it). Now, a second teammate should test the repository:ġ. Run ```git push``` to push the files up to the server Run ```git commit -m "Fresh IntelliJ JavaFX Project"``` to commit to your local repositoryġ. ``` to add ALL the files that showed in red in the previous command.ġ. (I'm kind of compulsive about this - it's hard to undo stuff if you make a mistake in Git)ġ. Confirm that the window still pops up when you run it from your git project.ġ. (If you open the project, it will create another IntelliJ project, which is undesirable here!)ġ. While opening it, it should recognize your top level git folder as an IntelliJ Project. It should show your intelliJ files in red.ġ. (From the command prompt, use ```ls -a``` to show folders starting with a dot (.)ġ. git folder if you have done this correctly. idea folder should show up side-by side with the. Copy the contents of your IntelliJ project into the contents of your empty git repo. Create an empty IntelliJ JavaFX project however you usually do it. I recommend getting the SSH link rather than the HTTP (once you set up SSH keys as above)ġ. Clone the empty repository with ```git clone _.git``` where the URL comes from the github page's "Clone this repository" link. To create a new IntelliJ project and check it into a blank Git project:ġ. * If you have not cloned the project yet, go to the project page, select "Clone" and "Use SSH" if it is not already showing the SSH URL:!(vmsetup_res/clone.png)Copy the SSH If you already pulled it with https, get the new url and reset the url with a command something like ```git remote set-url origin (Following * Now, github will automatically offer you the ssh-based git pull command. * Go to your user account settings at, go to the section "SSH and GPG keys," create a new key, and paste the public key into it. * Then copy it by selecting it, right-clicking, and selecting copy (Control-C means something different in a command prompt - it means "kill the current program") * Print it to the command prompt with ```cat ~/.ssh/id_rsa.pub``` * Specify no password by pressing enter again twice. * Accept the default location by pressing enter. * Create the key by running the command ```ssh-keygen``` * Make a public/private key pair (Acknowldegement: These instructions based on ) Follow these instructions if you do not want to type your username and password every time you push to git.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |