Posts

Showing posts with the label git

GIT commands

Image
Git command Flow: Setup: git config --global user.name “[firstname lastname]” set a name that is identifiable for credit when review version history git config --global user.email “[valid-email]” set an email address that will be associated with each history marker git config --system core.longpaths true Git has a limit of 4096 characters for a filename, except on Windows when Git is compiled with msys. It uses an older version of the Windows API and there's a limit of 260 characters for a filename. So as far as I understand this, it's a limitation of msys and not of Git. You can read the details here:  https://github.com/msysgit/git/pull/110     Setup & Init: git init Initialize an existing directory as a Git repository git clone <repository_url> retrieve an entire repository from a hosted location via URL git clone <URL...

Steps to Add local Project to github

1. Create a new repository on GitHub. In Terminal, change the current working directory to your local project. (You can open Git bash CLI ) 2. Initialize the local directory as a Git repository. git init 3. Add the files to your new local repository git add . 4. Commit the files that you have staged in your local repository. git commit -m 'commit message' 5. Copy the remote repository URL field from your GitHub repository For eg: https://github.com/vthangar0202/springboot_jpa_h2.git 6. In Terminal, add the URL for the remote repository where your local repository will be pushed. git remote add origin <remote repository URL> 7. Sets the new remote git remote -v 8. Push the changes in your local repository to GitHub. (You have to give git hub login credentials) git push origin master