Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I made changes to my file again #13

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Isaac
Original file line number Diff line number Diff line change
@@ -1 +1 @@
I love GhanaI love Ghana
I love GhanaI love Ghana
6 changes: 5 additions & 1 deletion Isaac_Rep
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
Isaac
This is a new one
Isaac
Ofori
This is a new one from me

48 changes: 42 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions andres_file.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hola
5 changes: 4 additions & 1 deletion group_file
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Hello! This is the group file. Add some toughts here!
Hello! This is the group file. Add some toughts here!


Shahed comp<INTERRUPTED THIS LINE!! NO TALKING ABOUT GROUP MEMBERS!!!>lains a lot
1 change: 1 addition & 0 deletions hello.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ajdnjasnjnas,d
2 changes: 2 additions & 0 deletions new_file_jack.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions new_sgupta.txt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jmasjdskskfckdvnj
6 changes: 6 additions & 0 deletions skp_file
Original file line number Diff line number Diff line change
@@ -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..