- Purpose - To gain familiarity the following features of JavaScript:
- Write functions that select and manipulate the DOM
- Applying Event Listeners
- Description - A simple html file with an image and buttons. Branches have additional Javascript to move the image via DOM manipulation in response to event listeners
- To fork the project, click the
Forkbutton located at the top right of the project.
- Navigate to your github profile to find the newly forked repository.
- Copy the URL of the project to the clipboard.
- Clone the repository from your account into the
~/devdirectory (or whatever the parent directory of your repositories is).- Make sure your parent directory is NOT a git repository by running
git status- You should see
fatal: not a git repository (or any of the parent directories)
- navigate to the
~/devparent directory by executing the following command:cd ~/dev
- clone the project by executing the following command:
git clone https://github.com/${MYUSERNAME}/${NAMEOFPROJECT}
- Make sure your parent directory is NOT a git repository by running
- Link the local repository just created with the original you forked from
- If new content is added to this repository, you can pull the new changes, but the remote 'origin' points to your forked version
- Add another remote and call it 'upstream':
git remote add upstream https://github.com/Java-Full-Stack-TEK/javascript_day-2-exercises
- To fetch or pull changes, we tell git to look at the Github upstream remote (pointing here) instead of the origin remote (which points to your fork):
- For git to try and merge changes, we use git pull :
git pull upstream master
- In case there of a merge conflict, we can update all remote branches, but save merging for later using git fetch :
git fetch upstream
- For git to try and merge changes, we use git pull :
- from a terminal navigate to the root directory of the cloned project.
- from the root directory of the project, execute the following commands:
- add all changes
git add .
- commit changes to be pushed
git commit -m 'I have added changes'
- push changes to your repository
git push -u origin master
- add all changes
- from the browser, navigate to the forked project from your github account.
- click the
Pull Requeststab. - select "New Pull Request"
- Link the local repository just created with the original you forked from
- If new content is added to this repository, you can pull the new changes, but the remote 'origin' points to your forked version
- Add another remote and call it 'upstream':
git remote add upstream https://github.com/Java-Full-Stack-TEK/javascript_day-2-exercises
- To fetch or pull changes, we tell git to look at the Github upstream remote (pointing here) instead of the origin remote (which points to your fork):
- For git to try and merge changes, we use git pull :
git pull upstream master
- In case there of a merge conflict, we can update all remote branches, but save merging for later using git fetch :
git fetch upstream
- For git to try and merge changes, we use git pull :