diff --git a/Isaac b/Isaac index 31fb23a..e35f1a4 100644 --- a/Isaac +++ b/Isaac @@ -1 +1 @@ -I love GhanaI love Ghana +I love GhanaI love Ghana diff --git a/Isaac_Rep b/Isaac_Rep index f70ca91..dfb82f5 100644 --- a/Isaac_Rep +++ b/Isaac_Rep @@ -1 +1,5 @@ -Isaac +This is a new one +Isaac +Ofori +This is a new one from me + diff --git a/README.md b/README.md index 4bc0baa..ba1dd0c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,50 @@ ## repository to practice git tools -Basic git commands +### To start with git + +- if you do not have WSL installed on Wondows, install git. Otherwise, WSL already has git installed. Just work from the WSL terminal +- add ssh keys to your machine via `ssh-keygen` command +- add public ssh keys to git web (in settings, add new ssh keys) +- do `git config` + +### Basic git commands Clone repository to a local machine -'git clone ...' +`git clone ...` + +Create your own branch "my_branch" +`git checkout -b my_branch` + +Check all branches +`git branch` + +Switch to a branch "branch_name" +`git branch branch_name` + +Add all your changes to local repository +`git add .` + +Add specific file to local repository +`git add file_name` + +Commit changes to a branch on a local machine +`git commit -m "description of my changes"` + +Push your changes in branch "branch_name" to the remote (cloud) +`git push origin branch_name` +This creates or updates "branch_name" on cloud github + +Merge your branch with master: on git website, submit merge request for your branch + +Update local master branch +`git pull origin main --rebase` + +**Explanation of the `-- rebase` option from [https://www.gitkraken.com](https://www.gitkraken.com/learn/git/git-rebase#:~:text=Git%20pull%20rebase%20is%20a,behind%20the%20origin%2Fmain%20branch.)** -Add your changes to local repository -'git add *' +So, what’s the difference between Git pull rebase and Git pull merge? While both of these options will combine the changes fetched from your remote, the outcome will look very different in your Git history. +Git pull merge is the default method for combining changes in Git, and will merge the unpublished changes with the published changes, resulting in a merge commit. -'git commit -m "description of my changes"' +With Git pull rebase, on the other hand, the unpublished changes will be reapplied on top of the published changes and no new commit will be added to your history. -'git push origin master' +With this in mind, you can see that Git pull rebase will result in a linear and cleaner project history by removing the unneeded merge commit. diff --git a/andres_file.txt b/andres_file.txt new file mode 100644 index 0000000..af5a062 --- /dev/null +++ b/andres_file.txt @@ -0,0 +1 @@ +Hola \ No newline at end of file diff --git a/group_file b/group_file index a23fa92..312bca1 100644 --- a/group_file +++ b/group_file @@ -1 +1,4 @@ -Hello! This is the group file. Add some toughts here! +Hello! This is the group file. Add some toughts here! + + +Shahed complains a lot \ No newline at end of file diff --git a/hello.txt b/hello.txt new file mode 100644 index 0000000..288c2c9 --- /dev/null +++ b/hello.txt @@ -0,0 +1 @@ +ajdnjasnjnas,d \ No newline at end of file diff --git a/new_file_jack.txt b/new_file_jack.txt new file mode 100644 index 0000000..a36763a --- /dev/null +++ b/new_file_jack.txt @@ -0,0 +1,2 @@ +Sample text added to the new file to merge into Github. +Isaac made this change to Jack's file again the 4th time then again diff --git a/new_sgupta.txt.txt b/new_sgupta.txt.txt new file mode 100644 index 0000000..b08fb64 --- /dev/null +++ b/new_sgupta.txt.txt @@ -0,0 +1 @@ +jmasjdskskfckdvnj \ No newline at end of file diff --git a/skp_file b/skp_file new file mode 100644 index 0000000..667f6f1 --- /dev/null +++ b/skp_file @@ -0,0 +1,6 @@ + +I am trying to add and +commit and push... hth!! + +First time done well.. Now +doing the ugly stuff!! Lets see..