git remote show origin
Get repository name
git remote add origin https://github.com/user/repo.git
First, run git config -l
to check your settings and make sure that you don't have something unexpected in there.
Use git config --global user.email correct-email@example.com
and git config --global user.name marcpre
to change the username
Stackoverflow - Username is not linked
git --exec-path
- add & commits
git git remote add origin "remote_repo_url"
Github - Adding an existing project
git rebase
Rebasing is the process of moving or combining a sequence of commits to a new base commit. Rebase has a powerful history rewriting features. The primary reason for rebasing is to maintain a linear project history. For example, consider a situation where the master branch has progressed since you started working on a feature branch.
Resync git repo with new gitignore file
git config --global credential.helper store
git pull origin master
Stackoverflow - Save username/pwd
# rm all files
git rm -r --cached .
# add all files as per new .gitignore
git add .
# now, commit for new .gitignore to apply
git commit -m ".gitignore is now working"
Stackoverflow - Resync gitignore file
-
On GitHub, navigate to the main page of the repository.
-
Releases tab Under your repository name, click Releases.
-
Releases draft buttonClick Draft a new release.
-
Releases tagged versionType a version number for your release. Versions are based on Git tags. We recommend naming tags that fit within semantic versioning.
git filter-branch --env-filter 'if [ "$GIT_AUTHOR_EMAIL" = "incorrect@email" ]; then
GIT_AUTHOR_EMAIL=correct@email;
GIT_AUTHOR_NAME="Correct Name";
GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL;
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; fi' -- --all
git log
Add the folder manually with git add folderName/
git push -u origin master
git config core.autocrlf false
--> under Windows
git pull origin master --allow-unrelated-histories
git pull origin master --allow-unrelated-histories