How to Create a Local Git Repository Assignment

Download Solution Order New Solution

Assignment Task

1. Install Git on AWS Ubuntu.

2. Create a directory with the name “My Project”.

3. Initialize the “My Project” directory as an empty git repository.

4. Place your eclipse project into this Git Repository.

5. Create a .gitignore file and configure it to exclude these files(*.class, *.settings, *.project)

6. Add the source code into Staging Area.

7. Commit the source code into Local git repository.

8. Create a Remote repository on GitHub.

9. Push the source code from Local repository to Remote Repository

  • Initialize any folder as Git Repository
  • Create a file as file1.java and file2.java
  • Add to the staging area and do a commit.
  • Now add file3.java
  • Create a Stash for file3.java
  • Verify the stash list that changes have been stored temporarily as Stash.
  • Apply the stash back to the branch
  • Clear the Stash
  •  Add file3.java to the staging area
  • Commit file3.java to the repository
  • Do a soft reset to 1st commit.
  • Revert the reset by doing a commit.
  • Do a mixed reset to 1st commit.
  • Revert the reset by adding the files to the staging area and commit.
  • Do a hard reset
  • Verify that changes have been removed from the system

You are requested to execute the following task

1. Create a file Demo.java which prints “Hello World”.

2. Create 2 branches out of this master. Feature1 and Feature2.

3. Make changes in feature 1 branch in the same line of code.

4. Commit the code in feature1 branch.

5. Now check out the feature2 branch and make a change in the same line as you did in feature1.

6. Commit the code in the feature 2 branch

7. Merge the Feature2 branch in the Feature1 branch. It should give a merge conflict.

8. Resolve the merge conflict with the help of Kdiff3 or Meld tool.

9. Verify the merge using git log command.

This IT and Computer Science has been solved by our PHD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.