This is a GitHub repo for experimental learning.
- Go to git hub and create a new repository and give it the name
- Choose to keep the readme and choose a licence
- Go to settings and then add collaborators
- Save the changes
- Click on code to get the link to clone the repo
- Go to terminal and cd to the directory where you want to have the new repo cloned
- Execute the command
- Create the new file (no special commands if you are on vs code) or touch and then vim to edit the file and then finally <:wq> to save the changes
- Do git add to add the file, then do git commit -m "commit message" to commit changes and then git push to show the changes
- Finally, go to git to view that the changes were posted.
- Executed
git log
- Created a branch named "still_experimental"
- Created a file named "dog.txt" using
touch
- Added the file to the staging area using
git add
- Committed the change using
git commit
- Pulled any new changes using
git pull
- Pushed latest changes to github using
git push origin main
- Paul created a pull request via github where a description and comment was included.
- Mauricio reviewed and accepted (merged) the pull request
- Pulled the latest changes using
git pull
and performed agit log
noticing that the merge from the checked out branch was performed successfully and logged in the git log.
- Edited the same file
- one person add, committed and pushed changes
- The second person did the same right after
- A merge conflict occured
- The second person prompted in the terminal git merge
- Resolved the issue but accepting both changes in the editor, then added, committed and pushed