Make sure you have:
- Git installed on your computer
- A Remote Repository is exactly what you're viewing right now, it allows us to share files and document changes easily
- Cloning is the practice of essentially copying the remote repository to your local device
- Through cloning the repository you have easy access to it, and are able to work within branches
- We need to clone because if we did not this project would essentially turn into an unorganized Cluster F#$%
- Launch Visual Studio Code
- Click on the Source Control icon in the Activity Bar (or press
Ctrl+Shift+G) - Click "Clone Repository"
- Enter the URL of the GitHub repository you want to clone
- Select a local folder where you want the repository to be saved
- When prompted, open the cloned repository
- Open Terminal in VSCode (Terminal > New Terminal)
- Navigate to the directory where you want to clone the repository
- Run the clone command:
git clone https://github.com/username/repository-name.git - Open the cloned project:
cd repository-name code .
- Click on the branch name in the bottom-left corner of VSCode
- This displays all local and remote branches
- As mentioned above a branch is your own personal area to code in
- We make branches so when we commit changes to the code, we don't break the entire program
- You should NEVER commit changes directly to the main branch
- In our case the main branch is named master
- Commit changes only to your own branch, until we meet next in class
- When we meet next in class or outside of class as a group we can discuss changes before implementing them as a whole
- Click on the branch name in the status bar (bottom-left)
- Select "Create new branch"
- Enter a name for your new branch
- Press Enter
- Click on the branch name in the status bar
- Select the branch you want to switch to
- Make your code changes in VSCode (You shouldn't ever have to really go online)
- Stage changes by clicking the "+" next to modified files in the Source Control panel (or by pressing
Ctrl+S) - Enter a commit message in the text field
- Click the checkmark icon (or press
Ctrl+Enter) to commit
- Click "..." in the Source Control panel
- Select "Push"
- If it's your first push to this branch, select "Publish Branch"
- DO NOT push to the main branch before discussing in class
git push origin my-branch-name
- You might be asking "But Surfur Gav! When do I push!" Great question, this is why you're my favorite!
- You should pull ONLY from the main for the time being after any new changes are commited to the main branch
- When you pull (grab the newest version of the code) there will be options to merge
- When you merge you can choose what to keep from the updated version, and if you'd like to keep anything from yours
- For example if the merge version has nothing to do with the file you're editing, simply keep the file you're working on, and merge all other changes
- Click "..." in the Source Control panel
- Select "Pull"
git commit -m "message": Commit staged changes- To commit is to publish this change as a snap shot
- It allows you to look for errors or difficulties that could arise
- You must always commit before pushing
git push: Push commits to remote repository- Pushing permanently alters a branch in the repository
- It takes the changes you commited, and pushes them onto the branch
- Remember to never push changes to the main branch unless we meet and discuss first
git pull: Fetch and merge changes from remote repository- Once you perform your initial clone, you will need to pull any changes made to the main branch
- Pulling from the main branch will ensure your code is up to date, and that any changes you've made work with the current version
git branch -d branch-name: Delete a branch locally
- Pull before push: Always pull the latest changes before pushing to avoid conflicts
- Commit Commit Commit: Make small, focused commits with clear messages. More frequent commits rather than periodic GIANT ones
- Use descriptive branch names: Name branches according to the feature/bug you're working on, but Try not to bloat the repo with too many
- Keep your branch up to date: Regularly merge changes from the **main branch into your branch
- DO NOT
- Delete merged branches: Clean up branches after they've been merged
- Open the files with conflicts/errors in VSCode
- Look for conflict markers (
<<<<<<<,=======,>>>>>>>) - Edit the files to resolve conflicts
- Stage the fixed files
- Commit the changes
- Commit your changes before switching
- Edit the
src/App.tsxfile to start working on the app.
-
Install the dependencies:
npm install
-
Start the development server:
npm start
-
Build and run iOS and Android development builds:
npm run ios # or npm run android -
In the terminal running the development server, press
ito open the iOS simulator,ato open the Android device or emulator, orwto open the web browser.
This app uses the react-dnd library, with a HTML5 backend
https://react-dnd.github.io/react-dnd/docs/api/dnd-provider
The ios and android folder are gitignored in the project by default as they are automatically generated during the build process (Continuous Native Generation). This means that you should not edit these folders directly and use config plugins instead. However, if you need to edit these folders, you can remove them from the .gitignore file so that they are tracked by git.
The Entire purpose of the Chess App is to test our coding knowledge and implementation of Machine Learning bots. We wanted to rebuild Chess.com for a better, free, user experience.