Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Let's share how to git push repo to GitHub

views
     
silverhawk
post Oct 18 2021, 01:18 AM

Eyes on Target
Group Icon
Elite
4,956 posts

Joined: Jan 2003


QUOTE(FlierMate @ Oct 17 2021, 10:16 PM)
It takes time for me to digest these useful information. Hopefully it could be of help to anyone like me who want to learn how to git (Yep, git is not exclusive to GitHub only, but to several others like GitLab that you have mentioned , which is a nice additional info ;-)

I am not familiar with SSH but certainly will look into it soon. The renaming from "master" to "main".... thanks for letting me know about it.
*
Get used to SSH, it makes your life so much easier. Look into configs that let you create hostname aliases. It lets you tie in your user & pubkey (and any other ssh setting) to a host and you can name it whatever you like. For example:

CODE

Host web1
HostName some.super.long.internal.hostname.address
User fliermate
IdentitiesOnly yes
IdentityFile ~/.ssh/fliermate


Then whenever you want to ssh into that server, you just do "ssh web1". There are ProxyJump options too, so you can use jumpboxes to access gated servers in one command (or "host"). Very useful in DB clients where access is often gated and you don't normally have the ability to enter multiple hosts to jump through in the UI.

Back to git

Some other useful commands that you might use

CODE

git unstage
git stash
git clean
git diff
git revert


These commands are also useful and you will be forced to use it at some point, but be careful when using them
CODE

git reset --hard
git rebase
git puish -f




 

Change to:
| Lo-Fi Version
0.0143sec    0.37    6 queries    GZIP Disabled
Time is now: 24th December 2025 - 12:14 PM