From c2bf7c9fa7fbba94c72eabb219f5c130948c62eb Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Mon, 7 Dec 2020 13:39:14 -0600 Subject: [PATCH 1/9] Update README.md Updated information files: The information files have been modified to better reflect the owner of the repository. Added repository owner information to README.md and deleted DELETEME.txt --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 834291b3..cb5455b0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Name:Jonathan German +NetID: JXG190036@utdallas.edu # Assignment 1 Example repository In this assignment you will perform a series of basic Git actions to get you familiarized with the basics. From f71bc6d6dad26f66e001558f09119e8e03517dfb Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Mon, 7 Dec 2020 13:40:44 -0600 Subject: [PATCH 2/9] Delete DELETEME.txt --- DELETEME.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 DELETEME.txt diff --git a/DELETEME.txt b/DELETEME.txt deleted file mode 100644 index 78695feb..00000000 --- a/DELETEME.txt +++ /dev/null @@ -1 +0,0 @@ -Make sure you delete this file. From 94cf09fee9d137efdbad63380281c9cb91ce73a7 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Tue, 8 Dec 2020 14:35:46 -0600 Subject: [PATCH 3/9] Create status.txt --- status.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 status.txt diff --git a/status.txt b/status.txt new file mode 100644 index 00000000..f2d10429 --- /dev/null +++ b/status.txt @@ -0,0 +1,13 @@ +jgerm@DESKTOP-S869PSA MINGW64 /c/Users/jgerm/Desktop/Project File 3354/project file 3354/3354-git (master) +$ git status +On branch master +Your branch is up to date with 'origin/master'. + +Changes to be committed: + (use "git restore --staged ..." to unstage) + new file: README - Copy.md + +Changes not staged for commit: + (use "git add/rm ..." to update what will be committed) + (use "git restore ..." to discard changes in working directory) + deleted: README - Copy.md From c3eec5b42ef6143ab8ae91cecf49b7d3e9935f05 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Tue, 8 Dec 2020 14:48:37 -0600 Subject: [PATCH 4/9] Create answers.tx --- answers.tx | 1 + 1 file changed, 1 insertion(+) create mode 100644 answers.tx diff --git a/answers.tx b/answers.tx new file mode 100644 index 00000000..880150f7 --- /dev/null +++ b/answers.tx @@ -0,0 +1 @@ +a) From 0b90dc84a0a217176b2e49c247361df35ff0fb91 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Thu, 10 Dec 2020 14:23:17 -0600 Subject: [PATCH 5/9] Update answers.tx made adjustments to file for question 9 --- answers.tx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/answers.tx b/answers.tx index 880150f7..9efbc8de 100644 --- a/answers.tx +++ b/answers.tx @@ -1 +1,17 @@ -a) +(a) How many commits exist in the repository history after completing step 8 (Including commits made by the original author)? +12 commits exist in the repository history after completing step 8. + +(b) When was the file .gitignore added? +.gitignore file was added four years ago. + +(c) What is the difference between git log and git status? +Git log shows the repository history while git status shows the current working directory and the staging area. + +(d) What is the difference between unstaged and untracked files? +Untracked files are not on git while unstaged files are on git but are not marked for commit. + +(e) What is the difference between git checkout and git reset? +Git Resset is specifically used for upadating the index while git checkout is for updating the working tree directly. + +(f) What happens if you try to pull remote changes when there are uncommitted changes in your working directory? +Git will give the following error message so you do not loose any vital code : "Cannot checkout as your working directory has uncommitted changes " From 2091fc007f7bcfaec347c5c4572cd4172e26ebf8 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Thu, 10 Dec 2020 14:30:53 -0600 Subject: [PATCH 6/9] Update answers.tx --- answers.tx | 1 + 1 file changed, 1 insertion(+) diff --git a/answers.tx b/answers.tx index 9efbc8de..aa39600a 100644 --- a/answers.tx +++ b/answers.tx @@ -15,3 +15,4 @@ Git Resset is specifically used for upadating the index while git checkout is fo (f) What happens if you try to pull remote changes when there are uncommitted changes in your working directory? Git will give the following error message so you do not loose any vital code : "Cannot checkout as your working directory has uncommitted changes " +TEST From 447b76fb05759eba81f43272300b40313a3eb88b Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Fri, 11 Dec 2020 04:25:39 -0600 Subject: [PATCH 7/9] Update Main.java Changes made to add two positive integers passed as arguments. --- Adder/src/adder/Main.java | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/Adder/src/adder/Main.java b/Adder/src/adder/Main.java index 6fe76933..f04c8361 100644 --- a/Adder/src/adder/Main.java +++ b/Adder/src/adder/Main.java @@ -1,17 +1,26 @@ -package adder; +File: Main.java -public class Main { - - public static void main(String[] args) { - try { - int result = addArguments(args); - System.out.println(result); - } catch (Exception e) { - System.err.println("Please provide two integers to add"); +public class Main +{ + public static void main(String args[]) + { + try + { + int result = addArguments(args); + System.out.println(result); + } + catch(Exception e) + { + System.err.println("Please provide integers to add "); + } + } + private static int addArguments(String[] args) + { + int sum = 0 ; // variable to store sum + for(int i=0; i < args.length; i++)// Loop to add all array element + { + sum = sum + Integer.valueOf(args[i]); // compute sum + } + return sum; //return sum } - } - - private static int addArguments(String[] args) { - return Integer.valueOf(args[0]) + Integer.valueOf(args[1]); - } } From 544f099d5f9f66d33682bbc75e4bcd026e9def65 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Fri, 11 Dec 2020 12:34:23 -0600 Subject: [PATCH 8/9] Update Main.java Changes were made to provide two different error messages. --- Adder/src/adder/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adder/src/adder/Main.java b/Adder/src/adder/Main.java index f04c8361..7d1cea66 100644 --- a/Adder/src/adder/Main.java +++ b/Adder/src/adder/Main.java @@ -13,10 +13,10 @@ public static void main(String args[]) { System.err.println("Please provide integers to add "); } - } + private static int addArguments(String[] args) { - int sum = 0 ; // variable to store sum + sum = 0 ; // variable to store sum for(int i=0; i < args.length; i++)// Loop to add all array element { sum = sum + Integer.valueOf(args[i]); // compute sum From b897b1fd08138491940877a940e5452714724883 Mon Sep 17 00:00:00 2001 From: jgerman413 <71850267+jgerman413@users.noreply.github.com> Date: Fri, 11 Dec 2020 13:58:45 -0600 Subject: [PATCH 9/9] Update Main.java Changes made to merge with experimental-branch --- Adder/src/adder/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adder/src/adder/Main.java b/Adder/src/adder/Main.java index 7d1cea66..f04c8361 100644 --- a/Adder/src/adder/Main.java +++ b/Adder/src/adder/Main.java @@ -13,10 +13,10 @@ public static void main(String args[]) { System.err.println("Please provide integers to add "); } - + } private static int addArguments(String[] args) { - sum = 0 ; // variable to store sum + int sum = 0 ; // variable to store sum for(int i=0; i < args.length; i++)// Loop to add all array element { sum = sum + Integer.valueOf(args[i]); // compute sum