Git Tutorial
Git and GitHub
Git Contribute
Git Advanced
Git Undo
Git Push to GitHub
Push Changes to GitHub
Let’s ty to make some changes to the local git and pushing them to GitHub.
Example:
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
<link rel=”stylesheet” href=”bluestyle.css”>
</head>
<body>
<h1>Hello world!</h1>
<div><img src=”img_hello_world.jpg” alt=”Hello World from Space” style=”width:100%;max-width:640px”></div>
<p>This is the first file in my new Git Repo.</p>
<p>This line is here to show how merging works.</p>
<div><img src=”img_hello_git.jpg” alt=”Hello Git” style=”width:100%;max-width:640px”></div>
</body>
</html>
Commit the changes:
[user@localhost] $ git commit -a -m “Updated index.html. Resized image”
[master e7de78f] Updated index.html. Resized image
1 file changed, 1 insertion(+), 1 deletion(-)
Check Status:
[user@localhost] $ git commit -a -m “Updated index.html. Resized image”
[master e7de78f] Updated index.html. Resized image
1 file changed, 1 insertion(+), 1 deletion(-
Push the changes to the remote origin:
[user@localhost] $ git push origin
Enumerating objects: 9, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 578 bytes | 578.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To https://github.com/webhostguru/hello-world.git
5a04b6f..facaeae master -> master
Switch to GitHub, and check whether the repository has a new commit:
