#git

It's simple, just follow the steps:)

1. Inside your GitHub team page, create an empty private repo with the same name of Bitbucket/GitLab
repo that you want to transfer.

2. Copy your newly created repo link, either in HTTPS or SSH.
For example, git@github.com:team-name/repo-name.git (SSH type)

3. Inside your local project folder, change the remote URL under.git/config ‘s file to your copied
GitHub's
one. The content looks similar as follows. [remote "origin"]
url = git@github.com:team-name/repo-name.git
fetch = +refs/heads/*:refs/remotes/origin/*

4. Do a git push: git push --all . It will push all codes and commit history on your newly GitHub
repository.

5. Done. After that, when we push new commits, it will push to GitHub only.

6. The Bitbucket/GitLab repo now can be archived to ‘Read-only’ mode.

My approach to edditing a commit message is to do an interactive rebase with the command git rebase -i HEAD~3.

This allows to change all commit until the specified commit (in this case 3 commits behind head, you can also give the SHA-1 hash of a commit instead of a number behind HEAD.

Afterwards, notepad opens where the commits are shown in order. There you can edit all commit messages as well as squash commits into the previous.

A more detailed description can be found here [1]

https://www.sitepoint.com/git-interactive-rebase-guide/

Hi, I had this problem already a few times, a good source for IntelliJ is: https://www.jetbrains.com/help/idea/edit-project-history.html#reword-commit
Even after pushing the commit, it is possible to change the message.
If you have not pushed yet this is a solution (for IntelliJ):

• Right-click the commit whose message you want to edit in the Log tab of the Git tool window Alt+9 and select Edit Commit Message from the context menu, or press F2.

• In the dialog that opens, enter a new commit message and click OK

You can also use the "git commit --amend" command.

I hope this helps!

How to edit a commit message on GitHub?

I made a mistake while writing the commit message. Is there a way to change the message? The commit has not been pushed yet.

Connecting Local Git Repository to GitHub does not work

I two courses I take this semester the code for the exercise part of these lectures is hosted in a GitHub repository. As I am required to work with the code, I need to interact with the remote Git server. When I try to pull by using git pull in command line as well as in the Eclipse IDE, a pop-up opens where I need to authenticate myself by providing username and password.

If you want to change commit message after commit, you can do this by:

git rebase --interactive '^'

With this rebase you want edit your commit comment, after that commit your changes:

git commit --all --amend --no-edit

At last go on with your rebase to finish it:

git rebase --continue
To get back to the HEAD.

SHA-1 of the commit changes, so be creaful by pushing your commits. Don't use git push --fore

Technology:

This problem is caused by windows saving credentials, like a password manager. Once you login to github via Intellij these credentials are saved in windows and everytime you connect to your github account it will use the saved credentials instead of the written ones. To remove the credentials in windows go to Control Panel, then click on User Accounts. In this window click on Credential Manager, the git credentials should be under Windows Credentials. Find the credentials that you need, click on them and then click on remove.

OperatingSystem:

Collaborate working with IntelliJ

Problem: Collaborate working with IntelliJ and Java: my colleagues and I used Java and the IntelliJ IDE for a university project (online voting system). To work together we decided to use git and had the issue, that by default the git Repository was filled with too much build data, because the .idea folder of the IntelliJ project, which contains project specific settings files and per-project details such as VCS mapping and run and debug configurations, as well as per-user details, such as currently open files, navigation history and currently selected configuration. Every commit ran into a conflict, because these files should not be commited to source control. Solution: Add a .gitignore file (also commited to the repository), which is then used by IntelliJ (and git) to determine which files and directories to ignore, before a commit is made.

Hi, an interesting solution! However I would like to know if there was any reason for you not to use GiT from beginning on? There are numerous solutions already in Internet concerning exactly these issues.

Taggings:

You can also remove files from the repository based on your .gitignore without deleting them from the local file system :

git rm --cached `git ls-files -i -X .gitignore`
Or, alternatively, on Windows Powershell:

git rm --cached $(git ls-files -i -X .gitignore)

Taggings:

Pages

Subscribe to #git