DEV Community

Philipe Leandro
Philipe Leandro

Posted on

Git and Github guide for begineers

If you have no knowledge about git and github and for some reason you need to use them, I can help you with these steps:
1 - First, in your bash, if it's the first time you're using it, you must register an user and email with: 
    $ git config --global user.name YOUR_NAME
    $ git config --global user.email your_name@example.com
2 - Now, manipulating the paths of  your machine, you can set a folder to be a place to save your files;
3 - For being a regular folder, you must have to initialize it with this command:
    $ git init 
    That way, the bash will recognize it as an initialized folder;
4 - After you have made all you needs, like creating and modifying files, you can follow these commands to send your modified files
    to a repository:
    - first, you might use $ git status to verify the status files;
    - second, with $ git add . or $ git add file_name you can add your files modification;
    - next, if you want, you can verify the status with $ git status;
    - with $ git commit -m "message", they'll be commited and ready to be pushed to a repository.
5 - With a synchronized github account, you can use $ git push <remote_name> <branch_name> to send them.
Enter fullscreen mode Exit fullscreen mode

Top comments (0)